File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 1515chmod +x helper
1616
1717test_expect_success ' setup ' '
18+ echo "bin: test number 0" >zero.bin &&
1819 echo "bin: test 1" >one.bin &&
1920 echo "bin: test number 2" >two.bin &&
2021 if test_have_prereq SYMLINKS; then
@@ -42,6 +43,7 @@ test_expect_success 'no filter specified' '
4243
4344test_expect_success ' setup textconv filters' '
4445 echo "*.bin diff=test" >.gitattributes &&
46+ echo "zero.bin eol=crlf" >>.gitattributes &&
4547 git config diff.test.textconv ./helper &&
4648 git config diff.test.cachetextconv false
4749'
@@ -73,6 +75,15 @@ test_expect_success 'blame --textconv going through revisions' '
7375 test_cmp expected result
7476'
7577
78+ test_expect_success ' blame --textconv with local changes' '
79+ test_when_finished "git checkout zero.bin" &&
80+ printf "bin: updated number 0\015" >zero.bin &&
81+ git blame --textconv zero.bin >blame &&
82+ expect="(Not Committed Yet ....-..-.. ..:..:.. +0000 1)" &&
83+ expect="$expect converted: updated number 0" &&
84+ expr "$(find_blame <blame)" : "^$expect"
85+ '
86+
7687test_expect_success ' make a new commit' '
7788 echo "bin: test number 2 version 3" >>two.bin &&
7889 GIT_AUTHOR_NAME=Number3 git commit -a -m Third --date="2010-01-01 22:00:00"
You can’t perform that action at this time.
0 commit comments