git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
EWEric Wong <normalperson@yhbt.net>
Date
Apr 18, 2007, 07:17 UTC
Message-ID
<20070418071733.GA10627@muzzle>

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>
---
 Junio: this can go in maint
 git-svn.perl |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index 4d3c453..efc4c88 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);
-- 
Eric Wong
Next: Junio C Hamano
Message 1 of 3 in “git-svn: don't allow globs to match regular files”
  1. git-svn: don't allow globs to match regular filesEric Wong, Apr 18, 2007
  2. Junio C HamanoApr 18, 2007
  3. Eric WongApr 18, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.