Re: [PATCH] git-svn: fix ls-tree usage with dash-prefixed paths

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2009.03.31 09:31:47 +0200, Björn Steinbrink wrote:
> On 2009.03.31 09:11:00 +0200, Björn Steinbrink wrote:
> > And interestingly, the problem doesn't seem to be in
> > show_tree/show_recursive, but in match_tree_entry.
> > 
> > With "git ls-tree HEAD gitweb/git-favicon.png g" we descend into gitweb/
> > and at some point we get:
> > 
> > match = "g"
> > base = "gitweb/"
> > 
> > And we have:
> > if (baselen >= matchlen) {
> > 	if (strncmp(base, match, matchlen))
> > 		continue;
> > 	/* The base is a subdirectory of a path which was specified */
> > 	return 1;
> > }
> > 
> > So we return 1 there. The code doesn't do what the comment says, so I
> > guess we can be pretty sure that the behaviour is not intended.
> 
> Yup, it's in match_tree_entry, you get the same thing with git show.
> With git.git, you can try with:
> 
> git show 4fa535a -- Documentation/git-merge.txt D
> 
> I'll try to get a patch done, if noone beats me to it.

Ah, crap, "git show" actually uses a different function,
tree_entry_interesting, which happens to have the same problem, but
needs a slightly different fix.

Björn
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux