author | Junio C Hamano <gitster@pobox.com> | |
Tue, 19 Aug 2008 03:08:09 +0000 (20:08 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 31 Aug 2008 03:53:24 +0000 (20:53 -0700) | ||
commit | a5a818ee4877e4458e8e6741a03ac3b19941d58a | |
tree | 5aaac05e0e8951fbafef1cef8eb4230a9bfe563c | tree | snapshot |
parent | 53d1589ff6bd336e3ece39e0a963a3d2a537cf96 | commit | diff |
diff: vary default prefix depending on what are compared
With a new configuration "diff.mnemonicprefix", "git diff" shows the
differences between various combinations of preimage and postimage trees
with prefixes different from the standard "a/" and "b/". Hopefully this
will make the distinction stand out for some people.
"git diff" compares the (i)ndex and the (w)ork tree;
"git diff HEAD" compares a (c)ommit and the (w)ork tree;
"git diff --cached" compares a (c)ommit and the (i)ndex;
"git-diff HEAD:file1 file2" compares an (o)bject and a (w)ork tree entity;
"git diff --no-index a b" compares two non-git things (1) and (2).
Because these mnemonics now have meanings, they are swapped when reverse
diff is in effect and this feature is enabled.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
With a new configuration "diff.mnemonicprefix", "git diff" shows the
differences between various combinations of preimage and postimage trees
with prefixes different from the standard "a/" and "b/". Hopefully this
will make the distinction stand out for some people.
"git diff" compares the (i)ndex and the (w)ork tree;
"git diff HEAD" compares a (c)ommit and the (w)ork tree;
"git diff --cached" compares a (c)ommit and the (i)ndex;
"git-diff HEAD:file1 file2" compares an (o)bject and a (w)ork tree entity;
"git diff --no-index a b" compares two non-git things (1) and (2).
Because these mnemonics now have meanings, they are swapped when reverse
diff is in effect and this feature is enabled.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/config.txt | diff | blob | history | |
builtin-diff.c | diff | blob | history | |
combine-diff.c | diff | blob | history | |
diff-lib.c | diff | blob | history | |
diff-no-index.c | diff | blob | history | |
diff.c | diff | blob | history | |
diff.h | diff | blob | history |