summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fea33a1)
raw | patch | inline | side by side (parent: fea33a1)
author | Junio C Hamano <gitster@pobox.com> | |
Sun, 15 May 2011 19:54:51 +0000 (12:54 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 15 May 2011 22:23:32 +0000 (15:23 -0700) |
The replacement mechanism should affect all types of objects not
just commits, so make sure it deals with at least a blob.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
just commits, so make sure it deals with at least a blob.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t6050-replace.sh | patch | blob | history |
diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh
index ae2194e07d835aa088a1c5b5f5fa5001f41ea7d5..5c87f28e4ed8c8c8dc40fd561516dd8d0db791c9 100755 (executable)
--- a/t/t6050-replace.sh
+++ b/t/t6050-replace.sh
git index-pack test-*.pack
'
-#
-#
+test_expect_success 'not just commits' '
+ echo replaced >file &&
+ git add file &&
+ REPLACED=$(git rev-parse :file) &&
+ mv file file.replaced &&
+
+ echo original >file &&
+ git add file &&
+ ORIGINAL=$(git rev-parse :file) &&
+ git update-ref refs/replace/$ORIGINAL $REPLACED &&
+ mv file file.original &&
+
+ git checkout file &&
+ test_cmp file.replaced file
+'
+
test_done