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>maint
parent
8104ebfe82
commit
272459a3b8
|
@ -81,8 +81,6 @@ int main(int argc, const char **argv)
|
||||||
|
|
||||||
type = blob_type;
|
type = blob_type;
|
||||||
|
|
||||||
git_config(git_default_config, NULL);
|
|
||||||
|
|
||||||
argc = parse_options(argc, argv, hash_object_options, hash_object_usage, 0);
|
argc = parse_options(argc, argv, hash_object_options, hash_object_usage, 0);
|
||||||
|
|
||||||
if (write_object) {
|
if (write_object) {
|
||||||
|
@ -92,6 +90,8 @@ int main(int argc, const char **argv)
|
||||||
vpath = prefix_filename(prefix, prefix_length, vpath);
|
vpath = prefix_filename(prefix, prefix_length, vpath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
git_config(git_default_config, NULL);
|
||||||
|
|
||||||
if (stdin_paths) {
|
if (stdin_paths) {
|
||||||
if (hashstdin)
|
if (hashstdin)
|
||||||
errstr = "Can't use --stdin-paths with --stdin";
|
errstr = "Can't use --stdin-paths with --stdin";
|
||||||
|
|
Loading…
Reference in New Issue