@matheusbsbs / matheus-bagliano / commits / 0c1ec5a1f7
Fork 0

git-svn: don't allow globs to match regular files

git only tracks the histories of full directories, not that of individual files. Sometimes, SVN users will place[1] a regular file in the directory designated for subdirectories of branches or tags. Thanks to jrockway on #git for pointing this out. [1] mistakenly or otherwise, such as a README Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>

Eric Wong committed Apr 18, 2007 at 00:17 UTC 0c1ec5a1f769021ebe96dfff493c561921dbba52
2 files changed +6
Documentation/RelNotes-1.5.1.1.txt
+4
@@ -59,3 +59,7 @@ Fixes since v1.5.1
59
60 - git-svn dcommit and rebase was confused by patches that were
61 merged from another branch that is managed by git-svn.
62 +
63 + - git-svn used to get confused when globbing remote branch/tag
64 + spec (e.g. "branches = proj/branches/*:refs/remotes/origin/*")
65 + is used and there was a plain file that matched the glob.
git-svn.perl
+2
@@ -3162,6 +3162,8 @@ sub match_globs {
3162 my $p = $1;
3163 my $pathname = $g->{path}->full_path($p);
3164 next if $exists->{$pathname};
3165 + next if ($self->check_path($pathname, $r) !=
3166 + $SVN::Node::dir);
3167 $exists->{$pathname} = Git::SVN->init(
3168 $self->{url}, $pathname, undef,
3169 $g->{ref}->full_path($p), 1);