Skip to content

Commit

Permalink
index-pack: setup git repository
Browse files Browse the repository at this point in the history
"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>
  • Loading branch information
Nguyễn Thái Ngọc Duy authored and Junio C Hamano committed Aug 26, 2008
1 parent 2b84373 commit d0b92a3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions index-pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down

0 comments on commit d0b92a3

Please sign in to comment.