Code

git-blame --incremental: don't use pager
authorRen\e,Ai\e(B Scharfe <rene.scharfe@lsrfire.ath.cx>
Sun, 28 Jan 2007 14:25:55 +0000 (15:25 +0100)
committerJunio C Hamano <junkio@cox.net>
Sun, 28 Jan 2007 19:00:57 +0000 (11:00 -0800)
Starting a pager defeats the purpose of the incremental output
mode.  This changes git-blame to only paginate if --incremental
was not given.

git -p blame --incremental still starts the pager, though.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-blame.c
git.c

index 7a58ee303f43668aa513181d91c9f1e412b0ffdf..02bda5e196be07ed65fb422aefce816d0bc89e11 100644 (file)
@@ -1780,6 +1780,9 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
                        argv[unk++] = arg;
        }
 
+       if (!incremental)
+               setup_pager();
+
        if (!blame_move_score)
                blame_move_score = BLAME_DEFAULT_MOVE_SCORE;
        if (!blame_copy_score)
diff --git a/git.c b/git.c
index 530e99fe64a1f1ee6d22ad8cada2560e52270e09..e9febc389af38c891a6f948543fa2dd13b74b560 100644 (file)
--- a/git.c
+++ b/git.c
@@ -217,7 +217,7 @@ static void handle_internal_command(int argc, const char **argv, char **envp)
                { "annotate", cmd_annotate, USE_PAGER },
                { "apply", cmd_apply },
                { "archive", cmd_archive },
-               { "blame", cmd_blame, RUN_SETUP | USE_PAGER },
+               { "blame", cmd_blame, RUN_SETUP },
                { "branch", cmd_branch, RUN_SETUP },
                { "cat-file", cmd_cat_file, RUN_SETUP },
                { "checkout-index", cmd_checkout_index, RUN_SETUP },