aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-02-13 20:48:38 +0200
committerSitaram Chamarty <sitaram@atc.tcs.com>2016-02-14 06:59:41 +0530
commit731d5521bb9d5294cf75aa6b8e4e18b135a49f3f (patch)
treeabf042e8d983bae1f71eb312dede0034a48898da
parentallow creator check to be bypassed during mirroring... (diff)
downloadgitolite-gentoo-731d5521bb9d5294cf75aa6b8e4e18b135a49f3f.tar.gz
gitolite-gentoo-731d5521bb9d5294cf75aa6b8e4e18b135a49f3f.tar.bz2
gitolite-gentoo-731d5521bb9d5294cf75aa6b8e4e18b135a49f3f.zip
ban repo name ending in ".git"
'user.html' says: The ".git" at the end is optional for git commands (i.e., you can use "testing.git" instead of "testing" for clone, fetch, push, etc., if you like) but gitolite commands in general will not like the additional ".git" at the end. Until now, we've been catching this trailing ".git" in various commands and such, but there are so many programs, it's hard to make sure they all do this properly. This patch catches it deep inside gitolite core. (based on patch sent by Paul Sokolovsky)
-rw-r--r--src/lib/Gitolite/Conf/Load.pm1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/Gitolite/Conf/Load.pm b/src/lib/Gitolite/Conf/Load.pm
index 7728a5a..a477486 100644
--- a/src/lib/Gitolite/Conf/Load.pm
+++ b/src/lib/Gitolite/Conf/Load.pm
@@ -252,6 +252,7 @@ sub sanity {
_die "'$repo' ends with a '/'" if $repo =~ m(/$);
_die "'$repo' contains '..'" if $repo =~ $REPONAME_PATT and $repo =~ m(\.\.);
_die "'$repo' contains '.git/'" if $repo =~ $REPONAME_PATT and $repo =~ m(\.git/);
+ _die "'$repo' ends with '.git'" if $repo =~ m(\.git$);
}
sub repo_missing {