summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-05-19 20:37:21 -0700
committerJunio C Hamano <gitster@pobox.com>2011-05-19 20:37:21 -0700
commit61d7503da141f13bc916b36012760791761cc909 (patch)
tree2b1cff95e16f2ed1543e4790d682e2e4996e92b7 /t
parent2d220862d43b4d54f3173f67956fc5221690fb7e (diff)
parent5bf29b950063c8fa2f3666cb6cf2ca20be61f3d1 (diff)
downloadgit-61d7503da141f13bc916b36012760791761cc909.tar.gz
Merge branch 'jc/replacing'
* jc/replacing: read_sha1_file(): allow selective bypassing of replacement mechanism inline lookup_replace_object() calls read_sha1_file(): get rid of read_sha1_file_repl() madness t6050: make sure we test not just commit replacement Declare lookup_replace_object() in cache.h, not in commit.h Conflicts: environment.c
Diffstat (limited to 't')
-rwxr-xr-xt/t6050-replace.sh18
1 files changed, 16 insertions, 2 deletions
diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh
index ae2194e07d..5c87f28e4e 100755
--- a/t/t6050-replace.sh
+++ b/t/t6050-replace.sh
@@ -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