summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b5e233e)
raw | patch | inline | side by side (parent: b5e233e)
author | Nelson Elhage <nelhage@ksplice.com> | |
Thu, 12 Aug 2010 14:18:12 +0000 (10:18 -0400) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 12 Aug 2010 20:26:05 +0000 (13:26 -0700) |
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>
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>
builtin/index-pack.c | patch | blob | history | |
t/t6050-replace.sh | patch | blob | history |
diff --git a/builtin/index-pack.c b/builtin/index-pack.c
index a89ae831dd6251d7332e06470273d30fd9cb31eb..fad76bf7a84a6a103de20732752119d5245e9638 100644 (file)
--- a/builtin/index-pack.c
+++ b/builtin/index-pack.c
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().
diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh
index 203ffdb17a914654d35416575b6797a2825ce4e6..4185b7ca1d3679b458d16753581fe78e3b68b376 100755 (executable)
--- a/t/t6050-replace.sh
+++ b/t/t6050-replace.sh
git bisect reset
'
+test_expect_success 'index-pack and replacements' '
+ git --no-replace-objects rev-list --objects HEAD |
+ git --no-replace-objects pack-objects test- &&
+ git index-pack test-*.pack
+'
+
#
#
test_done