mirror of
https://github.com/git/git.git
synced 2024-11-14 21:23:03 +01:00
b449005997
Traditionally, "show" defaulted to "show --cc" (dense combined patch), but
asking for combined patch with "show -c" didn't turn the patch output
format on; the placement of this logic in setup_revisions() dates back to
cd2bdc5
(Common option parsing for "git log --diff" and friends,
2006-04-14).
This unfortunately cannot be done as a trivial change of "if dense
combined is asked, default to patch format" done in setup_revisions() to
"if any combined is asked, default to patch format", as "diff-tree -c"
needs to default to raw, while "diff-tree --cc" needs to default to patch,
and they share the codepath. These command specific defaults are now
handled in the new "tweak" callback that can be customized by individual
command implementations.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
36 lines
471 B
Text
36 lines
471 B
Text
$ git show -c master
|
|
commit 59d314ad6f356dd08601a4cd5e530381da3e3c64
|
|
Merge: 9a6d494 c7a2ab9
|
|
Author: A U Thor <author@example.com>
|
|
Date: Mon Jun 26 00:04:00 2006 +0000
|
|
|
|
Merge branch 'side'
|
|
|
|
diff --combined dir/sub
|
|
index cead32e,7289e35..992913c
|
|
--- a/dir/sub
|
|
+++ b/dir/sub
|
|
@@@ -1,6 -1,4 +1,8 @@@
|
|
A
|
|
B
|
|
+C
|
|
+D
|
|
+E
|
|
+F
|
|
+ 1
|
|
+ 2
|
|
diff --combined file0
|
|
index b414108,f4615da..10a8a9f
|
|
--- a/file0
|
|
+++ b/file0
|
|
@@@ -1,6 -1,6 +1,9 @@@
|
|
1
|
|
2
|
|
3
|
|
+4
|
|
+5
|
|
+6
|
|
+ A
|
|
+ B
|
|
+ C
|
|
$
|