Skip to content

Commit

Permalink
ban repo name ending in ".git"
Browse files Browse the repository at this point in the history
'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)
  • Loading branch information
pfalcon authored and sitaramc committed Feb 14, 2016
1 parent 6c59f2a commit 731d552
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib/Gitolite/Conf/Load.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 731d552

Please sign in to comment.