X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=git.c;h=17538117a5ccfd48129a873697d8674e86f512f5;hb=9a9fb5d3c4c8601beb2d7b8e3b9283c6c3815a2d;hp=99f036302a7e6d884369d1d3f4ce428e437cbccd;hpb=ecdb3ec9846d06750a0d4b79884a763aa91daa40;p=git.git diff --git a/git.c b/git.c index 99f036302..17538117a 100644 --- a/git.c +++ b/git.c @@ -167,6 +167,7 @@ static int handle_alias(int *argcp, const char ***argv) alias_string = alias_lookup(alias_command); if (alias_string) { if (alias_string[0] == '!') { + commit_pager_choice(); if (*argcp > 1) { struct strbuf buf; @@ -329,7 +330,7 @@ static void handle_internal_command(int argc, const char **argv) { "fsck-objects", cmd_fsck, RUN_SETUP }, { "gc", cmd_gc, RUN_SETUP }, { "get-tar-commit-id", cmd_get_tar_commit_id }, - { "grep", cmd_grep, USE_PAGER }, + { "grep", cmd_grep }, { "hash-object", cmd_hash_object }, { "help", cmd_help }, { "index-pack", cmd_index_pack }, @@ -432,6 +433,8 @@ static void execv_dashed_external(const char **argv) const char *tmp; int status; + commit_pager_choice(); + strbuf_addf(&cmd, "git-%s", argv[0]); /* @@ -511,12 +514,12 @@ int main(int argc, const char **argv) argv++; argc--; handle_options(&argv, &argc, NULL); - commit_pager_choice(); if (argc > 0) { if (!prefixcmp(argv[0], "--")) argv[0] += 2; } else { /* The user didn't specify a command; give them help */ + commit_pager_choice(); printf("usage: %s\n\n", git_usage_string); list_common_cmds_help(); printf("\n%s\n", git_more_info_string);