summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenoît Knecht <knecht@ned-team.com>2015-04-22 11:27:03 +0200
committerSitaram Chamarty <sitaram@atc.tcs.com>2015-04-26 05:52:53 +0530
commit276cf761de0522a19b0312f4466fc497a2a38b5f (patch)
tree90a7a8f04c72df73279079156583024c1f32a1e0
parentopenssh 6.8 again... forgot sshkeys-lint the last time! (diff)
downloadgitolite-gentoo-276cf761de0522a19b0312f4466fc497a2a38b5f.tar.gz
gitolite-gentoo-276cf761de0522a19b0312f4466fc497a2a38b5f.tar.bz2
gitolite-gentoo-276cf761de0522a19b0312f4466fc497a2a38b5f.zip
git-annex-shell: accept repo paths without '~/'
It seems that (some versions of) git-annex use repository paths that simply start with '/' instead of '/~/', so make the '~/' part optional.
-rwxr-xr-xsrc/commands/git-annex-shell3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/commands/git-annex-shell b/src/commands/git-annex-shell
index a9b29d5..572aba6 100755
--- a/src/commands/git-annex-shell
+++ b/src/commands/git-annex-shell
@@ -18,12 +18,13 @@ my $cmd = $ENV{SSH_ORIGINAL_COMMAND};
# Expect commands like:
# git-annex-shell 'configlist' '/~/repo'
+# git-annex-shell 'configlist' '/repo'
# git-annex-shell 'sendkey' '/~/repo' 'key'
# The parameters are always single quoted, and the repo path is always
# the second parameter.
# Further parameters are not validated here (see below).
die "bad git-annex-shell command: $cmd"
- unless $cmd =~ m#^(git-annex-shell '\w+' ')/\~/([0-9a-zA-Z][0-9a-zA-Z._\@/+-]*)('( .*|))$#;
+ unless $cmd =~ m#^(git-annex-shell '\w+' ')/(?:\~/)?([0-9a-zA-Z][0-9a-zA-Z._\@/+-]*)('( .*|))$#;
my $start = $1;
my $repo = $2;
my $end = $3;