summaryrefslogtreecommitdiff
path: root/index-pack.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2008-08-26 14:32:42 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-08-26 23:25:48 (GMT)
commitd0b92a3f6e4d98a38a86cbd86f0e39eea9005958 (patch)
treee89f2be22b2aeeb018638d534e2a4b66e66b9947 /index-pack.c
parent2b8437321901cf1559527090f5a475f4924031e5 (diff)
downloadgit-d0b92a3f6e4d98a38a86cbd86f0e39eea9005958.zip
git-d0b92a3f6e4d98a38a86cbd86f0e39eea9005958.tar.gz
git-d0b92a3f6e4d98a38a86cbd86f0e39eea9005958.tar.bz2
index-pack: setup git repository
"git index-pack" is an independent command and does not setup git repository while still need pack.indexversion. It may miss the info if it is in a subdirectory of the repository. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'index-pack.c')
-rw-r--r--index-pack.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/index-pack.c b/index-pack.c
index 52064be..728af7d 100644
--- a/index-pack.c
+++ b/index-pack.c
@@ -876,7 +876,9 @@ int main(int argc, char **argv)
char *index_name_buf = NULL, *keep_name_buf = NULL;
struct pack_idx_entry **idx_objects;
unsigned char sha1[20];
+ int nongit = 0;
+ setup_git_directory_gently(&nongit);
git_config(git_index_pack_config, NULL);
for (i = 1; i < argc; i++) {