summaryrefslogtreecommitdiff
path: root/fast-import.c
diff options
context:
space:
mode:
authorSteffen Prohaska <prohaska@zib.de>2009-01-18 12:00:12 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-01-26 08:26:05 (GMT)
commit2fb3f6db96492b680899f9e40f434eeb4c778a84 (patch)
tree34fc6bc48403648216d8864fabcf28effb14c15a /fast-import.c
parent2cd72b0b290e40fb4d6a925ce26603503f01aa09 (diff)
downloadgit-2fb3f6db96492b680899f9e40f434eeb4c778a84.zip
git-2fb3f6db96492b680899f9e40f434eeb4c778a84.tar.gz
git-2fb3f6db96492b680899f9e40f434eeb4c778a84.tar.bz2
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 'fast-import.c')
-rw-r--r--fast-import.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fast-import.c b/fast-import.c
index f0e08ac..1935206 100644
--- a/fast-import.c
+++ b/fast-import.c
@@ -150,6 +150,7 @@ Format of STDIN stream:
#include "refs.h"
#include "csum-file.h"
#include "quote.h"
+#include "exec_cmd.h"
#define PACK_ID_BITS 16
#define MAX_PACK_ID ((1<<PACK_ID_BITS)-1)
@@ -2406,6 +2407,8 @@ int main(int argc, const char **argv)
{
unsigned int i, show_stats = 1;
+ git_extract_argv0_path(argv[0]);
+
setup_git_directory();
git_config(git_pack_config, NULL);
if (!pack_compression_seen && core_compression_seen)