summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-02-12 18:37:47 -0500
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-02-12 18:37:47 -0500
commitb8443a9c8466e80098a649c86d6cdbe1ad31cf57 (patch)
tree77acc96800b6750cd000a7303cbfad885e13b81d
parenta37021791ef141bf2c651eaad7ae887d9021386c (diff)
downloadgitlab-shell-b8443a9c8466e80098a649c86d6cdbe1ad31cf57.tar.gz
Improve logging for git-annex
-rw-r--r--lib/gitlab_shell.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/gitlab_shell.rb b/lib/gitlab_shell.rb
index b916122..596c82e 100644
--- a/lib/gitlab_shell.rb
+++ b/lib/gitlab_shell.rb
@@ -72,12 +72,13 @@ class GitlabShell
def process_cmd
repo_full_path = File.join(repos_path, repo_name)
- $logger.info "gitlab-shell: executing git command <#{@git_cmd} #{repo_full_path}> for #{log_username}."
if @git_cmd == 'git-annex-shell'
args = Shellwords.shellwords(@origin_cmd)
parsed_args =
args.map do |arg|
+ # Convert /~/group/project.git to group/project.git
+ # to make git annex path compatible with gitlab-shell
if arg =~ /\A\/~\/.*\.git\Z/
repo_full_path
else
@@ -85,8 +86,10 @@ class GitlabShell
end
end
+ $logger.info "gitlab-shell: executing git-annex command <#{parsed_args.join(' ')}> for #{log_username}."
exec_cmd(*parsed_args)
else
+ $logger.info "gitlab-shell: executing git command <#{@git_cmd} #{repo_full_path}> for #{log_username}."
exec_cmd(@git_cmd, repo_full_path)
end
end