All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Wong <normalperson@yhbt.net>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: [PATCH] git-svn: don't allow globs to match regular files
Date: Wed, 18 Apr 2007 00:17:33 -0700	[thread overview]
Message-ID: <20070418071733.GA10627@muzzle> (raw)

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

             reply	other threads:[~2007-04-18  7:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-18  7:17 Eric Wong [this message]
2007-04-18  7:45 ` [PATCH] git-svn: don't allow globs to match regular files Junio C Hamano
2007-04-18  7:53   ` Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070418071733.GA10627@muzzle \
    --to=normalperson@yhbt.net \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.