summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2016-03-18 12:21:17 +0000
committerDouwe Maan <douwe@gitlab.com>2016-03-18 12:21:17 +0000
commit52f73187516ebd2c6aa1f0df7df4d4f233dc17d2 (patch)
tree13c5f00c6fa8ec2ab658d023e89d93f77c4927b4
parent22b36aec8b8e0a49b4b33a11ac5f972e50cbd000 (diff)
parent55210648ef259e6ac167bb877decc919b292c0fd (diff)
downloadgitlab-shell-52f73187516ebd2c6aa1f0df7df4d4f233dc17d2.tar.gz
Merge branch 'fix/git-annex-ssh' into 'master' v2.6.12
Fix git-annex issue when using SSH on a custom port Easiest thing here is to use the full repo path on the server side. Fixes https://gitlab.com/gitlab-org/gitlab-ee/issues/166 See merge request !45
-rw-r--r--CHANGELOG3
-rw-r--r--VERSION2
-rw-r--r--lib/gitlab_shell.rb5
-rw-r--r--spec/gitlab_shell_spec.rb11
4 files changed, 16 insertions, 5 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 2862869..f2b809e 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+v2.6.12
+ - Fix git-annex issue not working using custom SSH port repositories
+
v2.6.11
- Increase HTTP timeout and log request durations
- Workaround for a Webrick issue on Ruby 2.2
diff --git a/VERSION b/VERSION
index bc02b86..c959dfb 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.6.11
+2.6.12
diff --git a/lib/gitlab_shell.rb b/lib/gitlab_shell.rb
index 96ee1b7..365c543 100644
--- a/lib/gitlab_shell.rb
+++ b/lib/gitlab_shell.rb
@@ -101,9 +101,8 @@ class GitlabShell
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/
+ # use full repo path
+ if arg =~ /\A\/.*\.git\Z/
repo_full_path
else
arg
diff --git a/spec/gitlab_shell_spec.rb b/spec/gitlab_shell_spec.rb
index 86d72f4..dd5cfb2 100644
--- a/spec/gitlab_shell_spec.rb
+++ b/spec/gitlab_shell_spec.rb
@@ -104,6 +104,15 @@ describe GitlabShell do
File.exists?(File.join(tmp_repos_path, 'dzaporozhets/gitlab.git/annex')).should be_false
end
end
+
+ context 'with git-annex and relative path without ~/' do
+ # Using a SSH URL on a custom port will generate /dzaporozhets/gitlab.git
+ let(:ssh_args) { %W(git-annex-shell inannex /dzaporozhets/gitlab.git SHA256E) }
+
+ it 'should init git-annex' do
+ File.exists?(File.join(tmp_repos_path, 'dzaporozhets/gitlab.git/annex')).should be_true
+ end
+ end
end
end
@@ -171,7 +180,7 @@ describe GitlabShell do
end
end
- context 'no command' do
+ context 'no command' do
after { subject.exec(nil) }
it "should call api.discover" do