aboutsummaryrefslogtreecommitdiff
path: root/git.c
diff options
context:
space:
mode:
authorRené Scharfe <rene.scharfe@lsrfire.ath.cx>2007-08-12 19:46:55 +0200
committerJunio C Hamano <gitster@pobox.com>2007-08-13 13:06:23 -0700
commit89d07f750a3f878c42b3de96ee93dc571b42b230 (patch)
tree9f841785ead20a6a67e0e15353b2449aa6b65f00 /git.c
parent4b37666ccbab015e75fda745c29a2f5d58a54482 (diff)
downloadgit-89d07f750a3f878c42b3de96ee93dc571b42b230.tar.gz
git-89d07f750a3f878c42b3de96ee93dc571b42b230.tar.xz
diff: don't run pager if user asked for a diff style exit code
As Wincent Colaiuta found out, it's a bit unexpected for git diff to start a pager even when the --quiet option is specified. The problem is that the pager hides the return code -- which is the only output we're interested in in this case. Push pager setup down into builtin-diff.c and don't start the pager if --exit-code or --quiet (which implies --exit-code) was specified. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git.c')
-rw-r--r--git.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/git.c b/git.c
index e5daae0f9..cab0e7227 100644
--- a/git.c
+++ b/git.c
@@ -325,7 +325,7 @@ static void handle_internal_command(int argc, const char **argv)
{ "config", cmd_config },
{ "count-objects", cmd_count_objects, RUN_SETUP },
{ "describe", cmd_describe, RUN_SETUP },
- { "diff", cmd_diff, USE_PAGER },
+ { "diff", cmd_diff },
{ "diff-files", cmd_diff_files },
{ "diff-index", cmd_diff_index, RUN_SETUP },
{ "diff-tree", cmd_diff_tree, RUN_SETUP },