From: Elijah Newren Date: Sat, 28 Feb 2009 19:56:49 +0000 (-0700) Subject: Ensure proper setup of git_dir for git-hash-object X-Git-Tag: v1.6.2.1~7^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=272459a3b809db19d15131eb5df9dfe939af9c8c;p=git.git Ensure proper setup of git_dir for git-hash-object Call setup_git_directory() before git_config() to make sure git_dir is set to the proper value. Signed-off-by: Elijah Newren Signed-off-by: Junio C Hamano --- diff --git a/hash-object.c b/hash-object.c index 846e91a23..adfd5336a 100644 --- a/hash-object.c +++ b/hash-object.c @@ -81,8 +81,6 @@ int main(int argc, const char **argv) type = blob_type; - git_config(git_default_config, NULL); - argc = parse_options(argc, argv, hash_object_options, hash_object_usage, 0); if (write_object) { @@ -92,6 +90,8 @@ int main(int argc, const char **argv) vpath = prefix_filename(prefix, prefix_length, vpath); } + git_config(git_default_config, NULL); + if (stdin_paths) { if (hashstdin) errstr = "Can't use --stdin-paths with --stdin";