{"thread":{"id":"7723","subject":"[PATCH] git-svn: don't allow globs to match regular files","startedAt":"2007-04-18T07:17:33Z","lastAt":"2007-04-18T07:53:54Z","messageCount":3,"participants":["Eric Wong","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"39743","messageId":"20070418071733.GA10627@muzzle","threadId":"7723","inReplyTo":null,"subject":"[PATCH] git-svn: don't allow globs to match regular files","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2007-04-18T07:17:33Z","receivedAt":"2007-04-18T07:17:33Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"git only tracks the histories of full directories, not\nthat of individual files.  Sometimes, SVN users will\nplace[1] a regular file in the directory designated\nfor subdirectories of branches or tags.\n\nThanks to jrockway on #git for pointing this out.\n\n[1] mistakenly or otherwise, such as a README\n\nSigned-off-by: Eric Wong <normalperson@yhbt.net>\n---\n\n Junio: this can go in maint\n\n git-svn.perl |    2 ++\n 1 files changed, 2 insertions(+), 0 deletions(-)\n\ndiff --git a/git-svn.perl b/git-svn.perl\nindex 4d3c453..efc4c88 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -3162,6 +3162,8 @@ sub match_globs {\n \t\t\tmy $p = $1;\n \t\t\tmy $pathname = $g->{path}->full_path($p);\n \t\t\tnext if $exists->{$pathname};\n+\t\t\tnext if ($self->check_path($pathname, $r) !=\n+\t\t\t         $SVN::Node::dir);\n \t\t\t$exists->{$pathname} = Git::SVN->init(\n \t\t\t                      $self->{url}, $pathname, undef,\n \t\t\t                      $g->{ref}->full_path($p), 1);\n-- \nEric Wong\n"},{"id":"39747","messageId":"7v3b2yjfcw.fsf@assigned-by-dhcp.cox.net","threadId":"7723","inReplyTo":"20070418071733.GA10627@muzzle","subject":"Re: [PATCH] git-svn: don't allow globs to match regular files","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-04-18T07:45:03Z","receivedAt":"2007-04-18T07:45:03Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Wong <normalperson@yhbt.net> writes:\n\n> git only tracks the histories of full directories, not\n> that of individual files.  Sometimes, SVN users will\n> place[1] a regular file in the directory designated\n> for subdirectories of branches or tags.\n>\n> Thanks to jrockway on #git for pointing this out.\n>\n> [1] mistakenly or otherwise, such as a README\n\nIt is not clear what this \"glob\" means to me.  Enlightenment?\n\nMy cursory reading of the code is that you are grabbing things\nunder branches/ and tags/, expecting each of what you would find\nthere is the whole-tree of a revision, and do not want to see\nany regular file immediately underneath branches/ and tags/.\n\nIs that what is happening here?\n"},{"id":"39748","messageId":"20070418075353.GA2758@hand.yhbt.net","threadId":"7723","inReplyTo":"7v3b2yjfcw.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] git-svn: don't allow globs to match regular files","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2007-04-18T07:53:54Z","receivedAt":"2007-04-18T07:53:54Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Junio C Hamano <junkio@cox.net> wrote:\n> Eric Wong <normalperson@yhbt.net> writes:\n> \n> > git only tracks the histories of full directories, not\n> > that of individual files.  Sometimes, SVN users will\n> > place[1] a regular file in the directory designated\n> > for subdirectories of branches or tags.\n> >\n> > Thanks to jrockway on #git for pointing this out.\n> >\n> > [1] mistakenly or otherwise, such as a README\n> \n> It is not clear what this \"glob\" means to me.  Enlightenment?\n\nBasically I can define an [svn-remote] in the config much in the same\nway that a native git [remote] is defined:\n\n[svn-remote \"svn\"]\n\turl = svn://svn.debian.org/svn/pkg-glibc\n\tbranches = glibc-package/branches/*:refs/remotes/*\n\ttags = glibc-package/tags/*:refs/remotes/tags/*\n\n> My cursory reading of the code is that you are grabbing things\n> under branches/ and tags/, expecting each of what you would find\n> there is the whole-tree of a revision, and do not want to see\n> any regular file immediately underneath branches/ and tags/.\n> \n> Is that what is happening here?\n\nYes. \n\n-- \nEric Wong\n"}]}