Code

Merge branch 'jn/maint-fast-import-empty-ls' into maint
[git.git] / t / t6050-replace.sh
index ae2194e07d835aa088a1c5b5f5fa5001f41ea7d5..5c87f28e4ed8c8c8dc40fd561516dd8d0db791c9 100755 (executable)
@@ -236,6 +236,20 @@ test_expect_success 'index-pack and replacements' '
        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