Thread (4 messages) flat view 4 messages, 2 authors, 2016-06-15
DORMANTno replies

[PATCH 1/2] t/t8006: Demonstrate blame is broken when cachetextconv is on

From: Kirill Smelkov <hidden>
Date: 2016-06-15 22:50:16
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
Cc: Clément Poulain <redacted>
Cc: Diane Gasselin <redacted>
Cc: Jeff King <redacted>
Signed-off-by: Kirill Smelkov <redacted>
---
 t/t8006-blame-textconv.sh |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/t/t8006-blame-textconv.sh b/t/t8006-blame-textconv.sh
index dbf623b..fe90541 100755
--- a/t/t8006-blame-textconv.sh
+++ b/t/t8006-blame-textconv.sh
@@ -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"
-- 
1.7.3.4.570.g14308
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help