summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-12-28 21:44:58 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-12-28 21:44:58 (GMT)
commit359f34f6cc948a2ddd2c99239f24a78d560bafd0 (patch)
tree36e0d7e594aea3802751c94378cec98c35a6e22d /t
parent58c58c8624d77ff4087ad93e515402db218684f6 (diff)
parent9ec09b0495f5e672223025f5e681371034da2538 (diff)
downloadgit-359f34f6cc948a2ddd2c99239f24a78d560bafd0.zip
git-359f34f6cc948a2ddd2c99239f24a78d560bafd0.tar.gz
git-359f34f6cc948a2ddd2c99239f24a78d560bafd0.tar.bz2
Merge branch 'ks/blame-worktree-textconv-cached' into maint
* ks/blame-worktree-textconv-cached: fill_textconv(): Don't get/put cache if sha1 is not valid t/t8006: Demonstrate blame is broken when cachetextconv is on
Diffstat (limited to 't')
-rwxr-xr-xt/t8006-blame-textconv.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/t/t8006-blame-textconv.sh b/t/t8006-blame-textconv.sh
index dbf623b..ea64cd8 100755
--- a/t/t8006-blame-textconv.sh
+++ b/t/t8006-blame-textconv.sh
@@ -73,6 +73,27 @@ test_expect_success 'blame --textconv going through revisions' '
test_cmp expected result
'
+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"