diff options
author | Sitaram Chamarty <sitaramc@gmail.com> | 2017-12-06 07:02:06 +0530 |
---|---|---|
committer | Sitaram Chamarty <sitaramc@gmail.com> | 2017-12-06 11:05:26 +0530 |
commit | 3e0c51e9902ed4940b52207502ae0bb62919a79b (patch) | |
tree | ed57675d7c38e8849e8c2c73ba929a3cb66a6f4a | |
parent | make pre-receive repo-specific hooks bail on non-zero exit (diff) | |
download | gitolite-gentoo-3e0c51e9902ed4940b52207502ae0bb62919a79b.tar.gz gitolite-gentoo-3e0c51e9902ed4940b52207502ae0bb62919a79b.tar.bz2 gitolite-gentoo-3e0c51e9902ed4940b52207502ae0bb62919a79b.zip |
remove trailing "/" if user supplied one
Basically, Linus complained that git-daemon is happy with the trailing /
so why does gitolite choke on it?
Fair enough.
Actual implementation: we choose to kill the "/" at the point of entry,
rather than weaken the sanity() function.
ref: https://groups.google.com/forum/#!topic/gitolite/zLMoQ7u28gk
-rwxr-xr-x | src/gitolite-shell | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gitolite-shell b/src/gitolite-shell index d9ec01f..2f49479 100755 --- a/src/gitolite-shell +++ b/src/gitolite-shell @@ -109,6 +109,10 @@ sub main { # set up the repo and the attempted access my ( $verb, $repo ) = parse_soc(); # returns only for git commands + + # remove trailing slash, if any + $repo =~ s(/$)(); + Gitolite::Conf::Load::sanity($repo, $REPONAME_PATT); $ENV{GL_REPO} = $repo; my $aa = ( $verb =~ 'upload' ? 'R' : 'W' ); |