Re: [PATCH] git-svn: fix ls-tree usage with dash-prefixed paths
- From
Björn Steinbrink <b.steinbrink@gmx.de>
- Date
- Mar 31, 2009, 07:31 UTC
- Message-ID
- <20090331073147.GB3307@atjola.homenet>
- In-Reply-To
- <20090331071100.GA3307@atjola.homenet>
On 2009.03.31 09:11:00 +0200, Björn Steinbrink wrote:
Show 19 quoted lines
> 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.
Björn