summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e423ffd)
raw | patch | inline | side by side (parent: e423ffd)
author | Thomas Rast <trast@student.ethz.ch> | |
Tue, 6 Jan 2009 23:56:03 +0000 (00:56 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 7 Jan 2009 07:40:02 +0000 (23:40 -0800) |
We need to parse options before we can see if --exit-code was
provided.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
provided.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff-no-index.c | patch | blob | history |
diff --git a/diff-no-index.c b/diff-no-index.c
index 39868e2a8fa47e91f8d21814ac433b516fc9535c..12ff1f1eefde8ac33709cd423a980708cd38b072 100644 (file)
--- a/diff-no-index.c
+++ b/diff-no-index.c
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;
}
}
+ /*
+ * 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();
+
if (prefix) {
int len = strlen(prefix);