Subject: [WIP PATCH 22/26] help: move up gitdir setup to run_builtin()

From: Nguyễn Thái Ngọc Duy <[email-masked]>
Date: Tue, 16 Feb 2010 23:05:13 +0700

Signed-off-by: Nguyễn Thái Ngọc Duy <[email-masked]>
---
 builtin-help.c |    2 --
 git.c          |    2 +-
 2 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/builtin-help.c b/builtin-help.c
index 3182a2b..4988629 100644
--- a/builtin-help.c
+++ b/builtin-help.c
@@ -414,7 +414,6 @@ static void show_html_page(const char *git_cmd)
 
 int cmd_help(int argc, const char **argv, const char *prefix)
 {
-	int nongit;
 	const char *alias;
 	enum help_format parsed_help_format;
 	load_command_list("git-", &main_cmds, &other_cmds);
@@ -437,7 +436,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 (parsed_help_format != HELP_FORMAT_NONE)
diff --git a/git.c b/git.c
index 0a0588b..c922400 100644
--- a/git.c
+++ b/git.c
@@ -344,7 +344,7 @@ static void handle_internal_command(int argc, const char **argv)
 		{ "get-tar-commit-id", cmd_get_tar_commit_id },
 		{ "grep", cmd_grep, RUN_SETUP_GENTLY | USE_PAGER },
 		{ "hash-object", cmd_hash_object, RUN_SETUP_GENTLY },
-		{ "help", cmd_help },
+		{ "help", cmd_help, RUN_SETUP_GENTLY },
 		{ "index-pack", cmd_index_pack },
 		{ "init", cmd_init_db },
 		{ "init-db", cmd_init_db },
-- 
1.7.0.195.g637a2