X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=git.c;h=f37028b3b722e6203ae8dac1ccf40a94421597d2;hb=452c6d506b1a6dcf24d4ceaa592afc39c1c1a60e;hp=265fa09d8d361ec0dab3626c846906f100cd6949;hpb=609eb9f7ff2af45d52ea90c0678a442d46aaa163;p=git.git diff --git a/git.c b/git.c index 265fa09d8..f37028b3b 100644 --- a/git.c +++ b/git.c @@ -8,8 +8,8 @@ const char git_usage_string[] = "git [--version] [--exec-path[=GIT_EXEC_PATH]] [--html-path]\n" " [-p|--paginate|--no-pager] [--no-replace-objects]\n" " [--bare] [--git-dir=GIT_DIR] [--work-tree=GIT_WORK_TREE]\n" - " [-c name=value\n" - " [--help] COMMAND [ARGS]"; + " [-c name=value] [--help]\n" + " COMMAND [ARGS]"; const char git_more_info_string[] = "See 'git help COMMAND' for more information on a specific command."; @@ -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; @@ -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);