Skip to content

Commit b1b14ec

Browse files
navytuxgitster
authored andcommitted
t/t8006: Demonstrate blame is broken when cachetextconv is on
I have a git repository with lots of .doc and .pdf files. There diff works ok, but blaming is painfully slow without textconv cache, and with textconv cache, blame says lots of lines are 'Not Yet Committed' which is wrong. Here is a test that demonstrates the problem. Cc: Axel Bonnet <[email protected]> Cc: Clément Poulain <[email protected]> Cc: Diane Gasselin <[email protected]> Cc: Jeff King <[email protected]> Signed-off-by: Kirill Smelkov <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 05bb5a2 commit b1b14ec

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

t/t8006-blame-textconv.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,28 @@ test_expect_success 'blame --textconv going through revisions' '
7373
test_cmp expected result
7474
'
7575

76+
test_expect_success 'setup +cachetextconv' '
77+
git config diff.test.cachetextconv true
78+
'
79+
80+
cat >expected_one <<EOF
81+
(Number2 2010-01-01 20:00:00 +0000 1) converted: test 1 version 2
82+
EOF
83+
84+
# one.bin is blamed as 'Not Committed yet'
85+
test_expect_failure 'blame --textconv works with textconvcache' '
86+
git blame --textconv two.bin >blame &&
87+
find_blame <blame >result &&
88+
test_cmp expected result &&
89+
git blame --textconv one.bin >blame &&
90+
find_blame <blame >result &&
91+
test_cmp expected_one result
92+
'
93+
94+
test_expect_success 'setup -cachetextconv' '
95+
git config diff.test.cachetextconv false
96+
'
97+
7698
test_expect_success 'make a new commit' '
7799
echo "bin: test number 2 version 3" >>two.bin &&
78100
GIT_AUTHOR_NAME=Number3 git commit -a -m Third --date="2010-01-01 22:00:00"

0 commit comments

Comments
 (0)