Code

Merge branch 'maint-1.7.7' into maint
[git.git] / t / t8006-blame-textconv.sh
index 53905a222738d9fef0cdc79108a241ec3ee5a042..4ee42f12f0af6bc7e4b072350f88988b85e40cbb 100755 (executable)
@@ -26,7 +26,8 @@ test_expect_success 'setup ' '
        echo "bin: test 1 version 2" >one.bin &&
        echo "bin: test number 2 version 2" >>two.bin &&
        if test_have_prereq SYMLINKS; then
-               ln -sf two.bin symlink.bin
+               rm symlink.bin &&
+               ln -s two.bin symlink.bin
        fi &&
        GIT_AUTHOR_NAME=Number2 git commit -a -m Second --date="2010-01-01 20:00:00"
 '
@@ -84,6 +85,27 @@ test_expect_success 'blame --textconv with local changes' '
        expr "$(find_blame <blame)" : "^$expect"
 '
 
+test_expect_success 'setup +cachetextconv' '
+       git config diff.test.cachetextconv true
+'
+
+cat >expected_one <<EOF
+(Number2 2010-01-01 20:00:00 +0000 1) converted: test 1 version 2
+EOF
+
+test_expect_success 'blame --textconv works with textconvcache' '
+       git blame --textconv two.bin >blame &&
+       find_blame <blame >result &&
+       test_cmp expected result &&
+       git blame --textconv one.bin >blame &&
+       find_blame  <blame >result &&
+       test_cmp expected_one result
+'
+
+test_expect_success 'setup -cachetextconv' '
+       git config diff.test.cachetextconv false
+'
+
 test_expect_success 'make a new commit' '
        echo "bin: test number 2 version 3" >>two.bin &&
        GIT_AUTHOR_NAME=Number3 git commit -a -m Third --date="2010-01-01 22:00:00"