Skip to content

Commit

Permalink
git-svn: don't allow globs to match regular files
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric Wong authored and Junio C Hamano committed Apr 18, 2007
1 parent 1401f46 commit 0c1ec5a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Documentation/RelNotes-1.5.1.1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
2 changes: 2 additions & 0 deletions git-svn.perl
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0c1ec5a

Please sign in to comment.