Re: Incorrect git-blame result if I use full path to file
- From
Linus Torvalds <torvalds@linux-foundation.org>
- Date
- Dec 3, 2007, 18:19 UTC
- Message-ID
- <alpine.LFD.0.9999.0712031014110.8458@woody.linux-foundation.org>
- In-Reply-To
- <alpine.LFD.0.9999.0712031012280.8458@woody.linux-foundation.org>
On Mon, 3 Dec 2007, Linus Torvalds wrote:
Show 6 quoted lines
> > On Mon, 3 Dec 2007, Johannes Schindelin wrote: > > > > I have the slight suspicion that this could break diff --no-index. > > Quite possible.
Side note: another issue (for the particular case that Anatol hit) is that this patch obviously only helps for commands that actually use "get_pathspec()" (usually through doing all the common argument setup stuff). So "git log" and friends work fine.
HOWEVER. "git blame" has its own argument parsing that doesn't use any of the common routines, and thus the behaviour that Anatol complained about isn't fixed at all by the patch.
I think that should be fixed by just making git blame use the standard arguments (which in turn may involve having to teach the *other* commands about the "-S <revs-file>" and "-L n,m" forms! I think those are why it does its own specialized parsing), but obviously git-blame could also be tought to just do "get_pathspec()" too.
Linus