From 769a4fa463bb36ba78eb318f25e0e211f4fae949 Mon Sep 17 00:00:00 2001 From: Christian Couder Date: Wed, 11 Dec 2013 08:46:12 +0100 Subject: builtin/replace: unset read_replace_refs When checking to see if some objects are of the same type and when displaying the type of objects, git replace uses the sha1_object_info() function. Unfortunately this function by default respects replace refs, so instead of the type of a replaced object, it gives the type of the replacement object which might be different. To fix this bug, and because git replace should work at a level before replacement takes place, let's unset the read_replace_refs global variable at the beginning of cmd_replace(). Suggested-by: Jeff King Signed-off-by: Christian Couder Signed-off-by: Junio C Hamano --- t/t6050-replace.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 't/t6050-replace.sh') diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh index e1cc3b89da..d0c62f7539 100755 --- a/t/t6050-replace.sh +++ b/t/t6050-replace.sh @@ -306,7 +306,7 @@ test_expect_success 'test --format medium' ' test_cmp expected actual ' -test_expect_failure 'test --format full' ' +test_expect_success 'test --format full' ' { echo "$H1 (commit) -> $BLOB (blob)" && echo "$BLOB (blob) -> $REPLACED (blob)" && -- cgit v1.2.1