X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=git.c;h=0409ac9fd3f1ea36680189e07116e58b2630ccad;hb=1f238da57334ca0155ae7560b173eefc8c4c157a;hp=8de48107e0dced316704c1ad78569ccb9eeebb08;hpb=9f44723d1a2c6a97306a7160deeab621e08bea7a;p=git.git diff --git a/git.c b/git.c index 8de48107e..0409ac9fd 100644 --- a/git.c +++ b/git.c @@ -1,18 +1,19 @@ #include "builtin.h" -#include "exec_cmd.h" #include "cache.h" +#include "exec_cmd.h" +#include "help.h" #include "quote.h" #include "run-command.h" const char git_usage_string[] = - "git [--version] [--exec-path[=GIT_EXEC_PATH]] [--html-path]\n" + "git [--version] [--exec-path[=]] [--html-path]\n" " [-p|--paginate|--no-pager] [--no-replace-objects]\n" - " [--bare] [--git-dir=GIT_DIR] [--work-tree=GIT_WORK_TREE]\n" + " [--bare] [--git-dir=] [--work-tree=]\n" " [-c name=value] [--help]\n" - " COMMAND [ARGS]"; + " []"; const char git_more_info_string[] = - "See 'git help COMMAND' for more information on a specific command."; + "See 'git help ' for more information on a specific command."; static struct startup_info git_startup_info; static int use_pager = -1; @@ -56,9 +57,6 @@ static int handle_options(const char ***argv, int *argc, int *envchanged) { int handled = 0; - if (!getenv("GIT_ASKPASS") && getenv("SSH_ASKPASS")) - setenv("GIT_ASKPASS", getenv("SSH_ASKPASS"), 1); - while (*argc > 0) { const char *cmd = (*argv)[0]; if (cmd[0] != '-') @@ -137,7 +135,7 @@ static int handle_options(const char ***argv, int *argc, int *envchanged) fprintf(stderr, "-c expects a configuration string\n" ); usage(git_usage_string); } - git_config_parse_parameter((*argv)[1]); + git_config_push_parameter((*argv)[1]); (*argv)++; (*argc)--; } else {