Re: git diff vs git diff-files

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

 



Bernd Jendrissek <bernd.jendrissek@xxxxxxxxx> writes:

> $ /usr/local/git/bin/git diff-files -p --color -- TwoStageAmp-output.net
> diff --git a/gnetlist/tests/common/outputs/osmond/TwoStageAmp-output.net
> b/gnetlist/tests/common/outputs/osmond/TwoStageAmp-output.net
> index a5ee1e7..a9f3620 100644

> $ /usr/local/git/bin/git diff TwoStageAmp-output.netdiff --git
> a/gnetlist/tests/common/outputs/osmond/TwoStageAmp-output.net
> b/gnetlist/tests/common/outputs/osmond/TwoStageAmp-output.n
> index a5ee1e7..a9f3620 100644

What's surprising is that both diff show the same "index" line, so both
commands actually diff the same content, and then show a different
output.

You can try something like

git cat-file blob a5ee1e7 > /tmp/staged.txt
diff -u /tmp/staged.txt TwoStageAmp-output.netdiff

to recover the content from the index (Thomas' version should also work
and give the same result), and use another diff tool. This "diff -u"
should give you an output similar to one of "git diff" and "git
diff-files" (my understanding is that it should match diff-files, and
"git diff" is the one being wrong here).

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
--
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]