X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=hash-object.c;h=ebb3bedb074202a29e2356845012bd1ffae0dc19;hb=22cdab5b3f93dc21ab29ab3a46c4ec0f0c3f0869;hp=846e91a23126b747fbea8d9a8511f708c3d70e43;hpb=4f8b8992ef0c009822cdca18d32ddf3a124ee284;p=git.git diff --git a/hash-object.c b/hash-object.c index 846e91a23..ebb3bedb0 100644 --- a/hash-object.c +++ b/hash-object.c @@ -8,6 +8,7 @@ #include "blob.h" #include "quote.h" #include "parse-options.h" +#include "exec_cmd.h" static void hash_fd(int fd, const char *type, int write_object, const char *path) { @@ -81,7 +82,7 @@ int main(int argc, const char **argv) type = blob_type; - git_config(git_default_config, NULL); + git_extract_argv0_path(argv[0]); argc = parse_options(argc, argv, hash_object_options, hash_object_usage, 0); @@ -92,6 +93,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";