Delay pager setup in git blame
authorMike Hommey <mh@glandium.org>
Sat, 3 Nov 2007 12:22:53 +0000 (13:22 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sun, 4 Nov 2007 04:31:37 +0000 (21:31 -0700)
This avoids to launch the pager when git blame fails for any reason.

Signed-off-by: Mike Hommey <mh@glandium.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-blame.c

index dc88a95..e17b03d 100644 (file)
@@ -2231,9 +2231,6 @@ 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)
@@ -2427,6 +2424,9 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
 
        read_mailmap(&mailmap, ".mailmap", NULL);
 
+       if (!incremental)
+               setup_pager();
+
        assign_blame(&sb, &revs, opt);
 
        if (incremental)