summaryrefslogtreecommitdiff
path: root/builtin-diff.c
diff options
context:
space:
mode:
authorAlex Riesen <raa.lkml@gmail.com>2008-07-21 23:28:49 +0200
committerJunio C Hamano <gitster@pobox.com>2008-07-23 11:14:47 -0700
commit8f0359f0a611fef9840218ba61162e9916124e89 (patch)
treeaf1567313181ae724bb0d20c0cc4a602afccc9bd /builtin-diff.c
parent0dda1d1ec816c613c9c0fd9b55ef0d3b782b84e8 (diff)
downloadgit-8f0359f0a611fef9840218ba61162e9916124e89.tar.gz
Allow pager of diff command be enabled/disabled
See for example, status and show commands. Besides, Documentation/RelNotes-1.6.0.txt mentions that pager.<cmd> can be used to enable/disable paging behavior per command. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-diff.c')
-rw-r--r--builtin-diff.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin-diff.c b/builtin-diff.c
index faaa85a1d4..7ffea97505 100644
--- a/builtin-diff.c
+++ b/builtin-diff.c
@@ -296,7 +296,8 @@ int cmd_diff(int argc, const char **argv, const char *prefix)
* 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(&rev.diffopt, EXIT_WITH_STATUS))
+ if (!DIFF_OPT_TST(&rev.diffopt, EXIT_WITH_STATUS) &&
+ check_pager_config("diff") != 0)
setup_pager();
/*