Skip to contentSkip to conversation

index-pack: setup git repository

PATCH New Nguyễn Thái Ngọc Duy 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 index-pack.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
index-pack.c +2 -0
index 52064be..728af7d 100644
@@ -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++) {
Signature · 1 line
1.6.0.96.g2fad1.dirty