Re: git diff-files weirdness (bug?)

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

 



Looks like a real bug.

On Fri, 23 May 2008, Catalin Marinas wrote:
>
> I was investigating a bug in "stg refresh" failing with moved files
> and noticed that it was caused by Git (HEAD pulled yesterday):
> 
>   git init
>   touch a
>   git add a
>   git commit -m "test"
>   git mv a b
> 
> These are OK:
> 
>   git diff-files -- a
>   git diff-files -- b
> 
> These fail:
> 
>   git diff-files -- a b
>   git diff-files -- a c

Yes, that's buggy.

What happens is that we get to run_diff_files_cmd(), but then we don't 
actually do "run_diff_files()", because we go into the NO_INDEX case:

	if (DIFF_OPT_TST(&revs->diffopt, NO_INDEX)) {
		...

instead.

Which in turn is because "setup_diff_no_index()" is broken.

And I think "setup_diff_no_index()" is broken exactly because it sees that 
'--' and then totally ignores it and says "if I see two paths, we'll say 
it's the non-index case".

		Linus
--
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