aboutsummaryrefslogtreecommitdiff
path: root/builtin/index-pack.c
diff options
context:
space:
mode:
authorNelson Elhage <nelhage@ksplice.com>2010-08-12 10:18:12 -0400
committerJunio C Hamano <gitster@pobox.com>2010-08-12 13:26:05 -0700
commit6e2a09d24b2634cdfec3395122cd4a07eb517b0d (patch)
treeae449e38f0318eda974a772a283f468203e726a0 /builtin/index-pack.c
parentb5e233ecc411c8685463333d180a135c6866c50e (diff)
downloadgit-6e2a09d24b2634cdfec3395122cd4a07eb517b0d.tar.gz
git-6e2a09d24b2634cdfec3395122cd4a07eb517b0d.tar.xz
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>
Diffstat (limited to 'builtin/index-pack.c')
-rw-r--r--builtin/index-pack.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin/index-pack.c b/builtin/index-pack.c
index a89ae831d..fad76bf7a 100644
--- a/builtin/index-pack.c
+++ b/builtin/index-pack.c
@@ -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().