summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3c652d1)
raw | patch | inline | side by side (parent: 3c652d1)
author | David Aguilar <davvid@gmail.com> | |
Tue, 1 Dec 2009 19:27:34 +0000 (11:27 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 1 Dec 2009 20:10:09 +0000 (12:10 -0800) |
Although 'git help' actually doesn't need to be run inside a git
repository and uses no repository-specific information, it looks for a git
directory. Searching for a git directory can be annoying in auto-mount
environments. With this commit, 'git help' no longer searches for a
repository when run without any options.
7c3baa9 originally modified 'git help -a' to not require a repository.
This applies the same fix for 'git help'.
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
repository and uses no repository-specific information, it looks for a git
directory. Searching for a git directory can be annoying in auto-mount
environments. With this commit, 'git help' no longer searches for a
repository when run without any options.
7c3baa9 originally modified 'git help -a' to not require a repository.
This applies the same fix for 'git help'.
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-help.c | patch | blob | history |
diff --git a/builtin-help.c b/builtin-help.c
index ca08519d9d6290f3cda4ee92e29e4acbf8325d0c..09ad4b04f9fa860a32580717e61acc942de23388 100644 (file)
--- a/builtin-help.c
+++ b/builtin-help.c
return 0;
}
- setup_git_directory_gently(&nongit);
- git_config(git_help_config, NULL);
-
if (!argv[0]) {
printf("usage: %s\n\n", git_usage_string);
list_common_cmds_help();
return 0;
}
+ setup_git_directory_gently(&nongit);
+ git_config(git_help_config, NULL);
+
alias = alias_lookup(argv[0]);
if (alias && !is_git_command(argv[0])) {
printf("`git %s' is aliased to `%s'\n", argv[0], alias);