From d0b92a3f6e4d98a38a86cbd86f0e39eea9005958 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Tue, 26 Aug 2008 21:32:42 +0700 Subject: [PATCH] index-pack: setup git repository MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit "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 Signed-off-by: Junio C Hamano --- index-pack.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index-pack.c b/index-pack.c index 52064befd..728af7da9 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++) { -- 2.30.2