diff options
author | Eric Wong <normalperson@yhbt.net> | 2007-04-18 11:17:33 +0400 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-04-18 23:39:04 +0400 |
commit | 0c1ec5a1f769021ebe96dfff493c561921dbba52 (patch) | |
tree | bf4c163dba9ba4ecaa985ddf8e8d82909313ea59 | |
parent | 1401f46bb42d1eb6225a5e08543c06a5b18fd3b7 (diff) |
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>
-rw-r--r-- | Documentation/RelNotes-1.5.1.1.txt | 4 | ||||
-rwxr-xr-x | git-svn.perl | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/Documentation/RelNotes-1.5.1.1.txt b/Documentation/RelNotes-1.5.1.1.txt index 3054b5a3f0..91471213bd 100644 --- a/Documentation/RelNotes-1.5.1.1.txt +++ b/Documentation/RelNotes-1.5.1.1.txt @@ -59,3 +59,7 @@ Fixes since v1.5.1 - git-svn dcommit and rebase was confused by patches that were merged from another branch that is managed by git-svn. + + - git-svn used to get confused when globbing remote branch/tag + spec (e.g. "branches = proj/branches/*:refs/remotes/origin/*") + is used and there was a plain file that matched the glob. diff --git a/git-svn.perl b/git-svn.perl index 4d3c453bf2..efc4c88a4e 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -3162,6 +3162,8 @@ sub match_globs { my $p = $1; my $pathname = $g->{path}->full_path($p); next if $exists->{$pathname}; + next if ($self->check_path($pathname, $r) != + $SVN::Node::dir); $exists->{$pathname} = Git::SVN->init( $self->{url}, $pathname, undef, $g->{ref}->full_path($p), 1); |