diff options
author | Steffen Prohaska <prohaska@zib.de> | 2009-01-18 13:00:12 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-01-26 00:26:05 -0800 |
commit | 2fb3f6db96492b680899f9e40f434eeb4c778a84 (patch) | |
tree | 34fc6bc48403648216d8864fabcf28effb14c15a /unpack-file.c | |
parent | 2cd72b0b290e40fb4d6a925ce26603503f01aa09 (diff) | |
download | git-2fb3f6db96492b680899f9e40f434eeb4c778a84.tar.gz |
Add calls to git_extract_argv0_path() in programs that call git_config_*
Programs that use git_config need to find the global configuration.
When runtime prefix computation is enabled, this requires that
git_extract_argv0_path() is called early in the program's main().
This commit adds the necessary calls.
Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Acked-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'unpack-file.c')
-rw-r--r-- | unpack-file.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/unpack-file.c b/unpack-file.c index bcdc8bbb3b..6dd8ad02fb 100644 --- a/unpack-file.c +++ b/unpack-file.c @@ -1,5 +1,6 @@ #include "cache.h" #include "blob.h" +#include "exec_cmd.h" static char *create_temp_file(unsigned char *sha1) { @@ -25,6 +26,8 @@ int main(int argc, char **argv) { unsigned char sha1[20]; + git_extract_argv0_path(argv[0]); + if (argc != 2) usage("git-unpack-file <sha1>"); if (get_sha1(argv[1], sha1)) |