auth: make ".git" at the end optional
This commit is contained in:
parent
071ff4c210
commit
648dce20ec
|
@ -84,9 +84,8 @@ my $cmd = $ENV{SSH_ORIGINAL_COMMAND};
|
||||||
# git-receive-pack 'reponame.git'
|
# git-receive-pack 'reponame.git'
|
||||||
# including the single quotes
|
# including the single quotes
|
||||||
|
|
||||||
my ($verb, $repo) = ($cmd =~ /^\s*(git\s+\S+|\S+)\s+'\/?(.*).git'/);
|
my ($verb, $repo) = ($cmd =~ /^\s*(git\s+\S+|\S+)\s+'\/?(.*?)(?:.git)?'/);
|
||||||
die "bad command: $cmd. Make sure the repo name is exactly\n" .
|
die "bad command: $cmd. Make sure the repo name is exactly as in your config\n"
|
||||||
"as in your config (no extra stuff before the name), plus a \".git\" at the end\n"
|
|
||||||
unless ( $verb and ( $verb =~ $R_COMMANDS or $verb =~ $W_COMMANDS )
|
unless ( $verb and ( $verb =~ $R_COMMANDS or $verb =~ $W_COMMANDS )
|
||||||
and $repo and $repo =~ $REPONAME_PATT );
|
and $repo and $repo =~ $REPONAME_PATT );
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue