@matheusbsbs / matheus-bagliano / commits / 272459a3b8
Fork 0

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 <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Elijah Newren committed Feb 28, 2009 at 12:56 UTC 272459a3b809db19d15131eb5df9dfe939af9c8c
1 file changed +2 -2
hash-object.c
+2 -2
@@ -81,8 +81,6 @@ int main(int argc, const char **argv)
81
82 type = blob_type;
83
84 - git_config(git_default_config, NULL);
85 -
84 argc = parse_options(argc, argv, hash_object_options, hash_object_usage, 0);
85
86 if (write_object) {
@@ -92,6 +90,8 @@ int main(int argc, const char **argv)
90 vpath = prefix_filename(prefix, prefix_length, vpath);
91 }
92
93 + git_config(git_default_config, NULL);
94 +
95 if (stdin_paths) {
96 if (hashstdin)
97 errstr = "Can't use --stdin-paths with --stdin";