diff options
author | Elijah Newren <newren@gmail.com> | 2009-02-28 12:56:49 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-02-28 14:09:46 -0800 |
commit | 272459a3b809db19d15131eb5df9dfe939af9c8c (patch) | |
tree | 8c4fa69a2b495b329898c86e24fdc8fdefb6d6a2 /hash-object.c | |
parent | 8104ebfe8276657ee803cca7eb8665a78cf3ef83 (diff) | |
download | git-272459a3b809db19d15131eb5df9dfe939af9c8c.tar.gz |
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>
Diffstat (limited to 'hash-object.c')
-rw-r--r-- | hash-object.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hash-object.c b/hash-object.c index 846e91a231..adfd5336a3 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"; |