We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0403660 commit b3fde6cCopy full SHA for b3fde6c
diff-no-index.c
@@ -198,6 +198,13 @@ void diff_no_index(struct rev_info *revs,
198
die("git diff %s takes two paths",
199
no_index ? "--no-index" : "[--no-index]");
200
201
+ /*
202
+ * If the user asked for our exit code then don't start a
203
+ * pager or we would end up reporting its exit code instead.
204
+ */
205
+ if (!DIFF_OPT_TST(&revs->diffopt, EXIT_WITH_STATUS))
206
+ setup_pager();
207
+
208
diff_setup(&revs->diffopt);
209
if (!revs->diffopt.output_format)
210
revs->diffopt.output_format = DIFF_FORMAT_PATCH;
0 commit comments