path: root/t/
diff options
authorChristian Couder <>2013-12-11 07:46:12 (GMT)
committerJunio C Hamano <>2013-12-12 19:53:49 (GMT)
commit769a4fa463bb36ba78eb318f25e0e211f4fae949 (patch)
tree6199547f8cab26c70d82481e978c81cd6df22592 /t/
parentbbbb4afc26cd3d711e07a345d1e5f9eedc68100f (diff)
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 <>
Diffstat (limited to 't/')
1 files changed, 1 insertions, 1 deletions
diff --git a/t/ b/t/
index e1cc3b8..d0c62f7 100755
--- a/t/
+++ b/t/
@@ -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)" &&