Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
git diff --no-index: default to page like other diff frontends
author
Junio C Hamano
<gitster@pobox.com>
Tue, 27 May 2008 05:35:07 +0000
(22:35 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 27 May 2008 05:35:07 +0000
(22:35 -0700)
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff-no-index.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
0403660
)
diff --git
a/diff-no-index.c
b/diff-no-index.c
index b1ae7912c18ee762d22b5530fba8ad39f2364315..f6994cf5fb0b9fa570ded7012088ba8b8be5fd71 100644
(file)
--- a/
diff-no-index.c
+++ b/
diff-no-index.c
@@
-198,6
+198,13
@@
void diff_no_index(struct rev_info *revs,
die("git diff %s takes two paths",
no_index ? "--no-index" : "[--no-index]");
die("git diff %s takes two paths",
no_index ? "--no-index" : "[--no-index]");
+ /*
+ * If the user asked for our exit code then don't start a
+ * pager or we would end up reporting its exit code instead.
+ */
+ if (!DIFF_OPT_TST(&revs->diffopt, EXIT_WITH_STATUS))
+ setup_pager();
+
diff_setup(&revs->diffopt);
if (!revs->diffopt.output_format)
revs->diffopt.output_format = DIFF_FORMAT_PATCH;
diff_setup(&revs->diffopt);
if (!revs->diffopt.output_format)
revs->diffopt.output_format = DIFF_FORMAT_PATCH;