author | Junio C Hamano <gitster@pobox.com> | |
Tue, 1 Nov 2011 22:20:28 +0000 (15:20 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 1 Nov 2011 22:20:28 +0000 (15:20 -0700) |
* ss/blame-textconv-fake-working-tree:
(squash) test for previous
blame.c: Properly initialize strbuf after calling, textconv_object()
Conflicts:
t/t8006-blame-textconv.sh
(squash) test for previous
blame.c: Properly initialize strbuf after calling, textconv_object()
Conflicts:
t/t8006-blame-textconv.sh
1 | 2 | |||
---|---|---|---|---|
builtin/blame.c | patch | | diff1 | | diff2 | | blob | history |
t/t8006-blame-textconv.sh | patch | | diff1 | | diff2 | | blob | history |
diff --cc builtin/blame.c
Simple merge
diff --cc t/t8006-blame-textconv.sh
index 32ec82ad678d56bbf27f525fc8588b3391d9117d,53905a222738d9fef0cdc79108a241ec3ee5a042..4ee42f12f0af6bc7e4b072350f88988b85e40cbb
test_cmp expected result
'
+ test_expect_success 'blame --textconv with local changes' '
+ test_when_finished "git checkout zero.bin" &&
+ printf "bin: updated number 0\015" >zero.bin &&
+ git blame --textconv zero.bin >blame &&
+ expect="(Not Committed Yet ....-..-.. ..:..:.. +0000 1)" &&
+ expect="$expect converted: updated number 0" &&
+ 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"