@matheusbsbs / matheus-bagliano / commits / d0b92a3f6e
Fork 0

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>

Nguyễn Thái Ngọc Duy committed Aug 26, 2008 at 21:32 UTC d0b92a3f6e4d98a38a86cbd86f0e39eea9005958
1 file changed +2
index-pack.c
+2
@@ -876,7 +876,9 @@ int main(int argc, char **argv)
876 char *index_name_buf = NULL, *keep_name_buf = NULL;
877 struct pack_idx_entry **idx_objects;
878 unsigned char sha1[20];
879 + int nongit = 0;
880
881 + setup_git_directory_gently(&nongit);
882 git_config(git_index_pack_config, NULL);
883
884 for (i = 1; i < argc; i++) {