summaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2012-06-15 16:32:55 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-06-15 14:27:36 -0700
commitaf63b543ed9f7d606cdd2c7a3bcded4e2dc8dad4 (patch)
treeeb57e49afd104386030a922188a70c5473608b8a /commit.c
parentfix pager.diff with diff --no-index (diff)
downloadtgif-af63b543ed9f7d606cdd2c7a3bcded4e2dc8dad4.tar.xz
do not run pager with diff --no-index --quiet
There is no point in running a pager when --quiet is given, since we are producing no output. The regular diff code path handles this already, because --quiet implies --exit-code, and we check for --exit-code when deciding not to run the pager. However, the "quiet implies exit-code" logic is done in diff_setup_done, and the no-index code path sets up its pager before running diff_setup_done, and misses this case. We can fix this by reordering our initialization. Currently we do: 1. read command line arguments into diff_options 2. Set pager if EXIT_CODE not requested 3. always set EXIT_CODE, since we are emulating traditional diff 4. call diff_setup_done We can fix the problem by moving pager initialization (step 2) after step 4. But step 3 must come after step 2 (since we want to know whether the _user_ requested --exit-code, not whether we turned it on unconditionally). So we must move both. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.c')
0 files changed, 0 insertions, 0 deletions