Skip to content

Commit

Permalink
t/t8006: Demonstrate blame is broken when cachetextconv is on
Browse files Browse the repository at this point in the history
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 <axel.bonnet@ensimag.imag.fr>
Cc: Clément Poulain <clement.poulain@ensimag.imag.fr>
Cc: Diane Gasselin <diane.gasselin@ensimag.imag.fr>
Cc: Jeff King <peff@peff.net>
Signed-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Kirill Smelkov authored and Junio C Hamano committed Dec 20, 2010
1 parent 05bb5a2 commit b1b14ec
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions t/t8006-blame-textconv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,28 @@ 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

# one.bin is blamed as 'Not Committed yet'
test_expect_failure '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"
Expand Down

0 comments on commit b1b14ec

Please sign in to comment.