git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] git-svn: don't allow globs to match regular files
@ 2007-04-18  7:17 Eric Wong
  2007-04-18  7:45 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Wong @ 2007-04-18  7:17 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] git-svn: don't allow globs to match regular files
  2007-04-18  7:17 [PATCH] git-svn: don't allow globs to match regular files Eric Wong
@ 2007-04-18  7:45 ` Junio C Hamano
  2007-04-18  7:53   ` Eric Wong
  0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2007-04-18  7:45 UTC (permalink / raw)
  To: Eric Wong; +Cc: git

Eric Wong <normalperson@yhbt.net> writes:

> 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

It is not clear what this "glob" means to me.  Enlightenment?

My cursory reading of the code is that you are grabbing things
under branches/ and tags/, expecting each of what you would find
there is the whole-tree of a revision, and do not want to see
any regular file immediately underneath branches/ and tags/.

Is that what is happening here?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] git-svn: don't allow globs to match regular files
  2007-04-18  7:45 ` Junio C Hamano
@ 2007-04-18  7:53   ` Eric Wong
  0 siblings, 0 replies; 3+ messages in thread
From: Eric Wong @ 2007-04-18  7:53 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

Junio C Hamano <junkio@cox.net> wrote:
> Eric Wong <normalperson@yhbt.net> writes:
> 
> > 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
> 
> It is not clear what this "glob" means to me.  Enlightenment?

Basically I can define an [svn-remote] in the config much in the same
way that a native git [remote] is defined:

[svn-remote "svn"]
	url = svn://svn.debian.org/svn/pkg-glibc
	branches = glibc-package/branches/*:refs/remotes/*
	tags = glibc-package/tags/*:refs/remotes/tags/*

> My cursory reading of the code is that you are grabbing things
> under branches/ and tags/, expecting each of what you would find
> there is the whole-tree of a revision, and do not want to see
> any regular file immediately underneath branches/ and tags/.
> 
> Is that what is happening here?

Yes. 

-- 
Eric Wong

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-04-18  7:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-18  7:17 [PATCH] git-svn: don't allow globs to match regular files Eric Wong
2007-04-18  7:45 ` Junio C Hamano
2007-04-18  7:53   ` Eric Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).