* [PATCH] help: Do not unnecessarily look for a repository
@ 2009-12-01 19:27 David Aguilar
0 siblings, 0 replies; only message in thread
From: David Aguilar @ 2009-12-01 19:27 UTC (permalink / raw)
To: gitster; +Cc: git, David Aguilar
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>
---
builtin-help.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/builtin-help.c b/builtin-help.c
index ca08519..09ad4b0 100644
--- a/builtin-help.c
+++ b/builtin-help.c
@@ -427,9 +427,6 @@ int cmd_help(int argc, const char **argv, const char *prefix)
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();
@@ -437,6 +434,9 @@ int cmd_help(int argc, const char **argv, const char *prefix)
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);
--
1.6.5.3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-12-01 19:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-01 19:27 [PATCH] help: Do not unnecessarily look for a repository David Aguilar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).