index-pack: Don't follow replace refs.
Without this, attempting to index a pack containing objects that have been replaced results in a fatal error that looks like: fatal: SHA1 COLLISION FOUND WITH <replaced-object> ! Signed-off-by: Nelson Elhage <nelhage@ksplice.com> Acked-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
b5e233ecc4
commit
6e2a09d24b
@ -884,6 +884,8 @@ int cmd_index_pack(int argc, const char **argv, const char *prefix)
|
||||
if (argc == 2 && !strcmp(argv[1], "-h"))
|
||||
usage(index_pack_usage);
|
||||
|
||||
read_replace_refs = 0;
|
||||
|
||||
/*
|
||||
* We wish to read the repository's config file if any, and
|
||||
* for that it is necessary to call setup_git_directory_gently().
|
||||
|
Reference in New Issue
Block a user