summaryrefslogtreecommitdiff
path: root/t/t8004-blame-with-conflicts.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-09-10 23:30:20 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-09-11 01:42:30 (GMT)
commitffcabccf5df17f12997feedafefeb5589b8c0511 (patch)
treec65351b5cbc06dc78966cf387411887ea8c35373 /t/t8004-blame-with-conflicts.sh
parent785ee4960c3d334cbc2b17ab74d2cebdf1b4db64 (diff)
downloadgit-ffcabccf5df17f12997feedafefeb5589b8c0511.zip
git-ffcabccf5df17f12997feedafefeb5589b8c0511.tar.gz
git-ffcabccf5df17f12997feedafefeb5589b8c0511.tar.bz2
blame $path: avoid getting fooled by case insensitive filesystems
"git blame MAKEFILE" run in a history that has "Makefile" but not MAKEFILE can get confused on a case insensitive filesystem, because the check we run to see if there is a corresponding file in the working tree with lstat("MAKEFILE") succeeds. In addition to that check, we have to make sure that the given path also exists in the commit we start digging history from (i.e. "HEAD"). Note that this reveals the breakage in a test added in cd8ae20 (git-blame shouldn't crash if run in an unmerged tree, 2007-10-18), which expects the entire merge-in-progress path to be blamed to the working tree when it did not exist in our tree. As it is clear in the log message of that commit, the old breakage was that it was causing an internal error and the fix was about avoiding it. Just check that the command does not die an uncontrolled death. For this particular case, the blame should fail, as the history for the file in that contents has not been committed yet at the point in the test. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t8004-blame-with-conflicts.sh')
-rwxr-xr-xt/t8004-blame-with-conflicts.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t8004-blame-with-conflicts.sh b/t/t8004-blame-with-conflicts.sh
index ba19ac1..b4a260a 100755
--- a/t/t8004-blame-with-conflicts.sh
+++ b/t/t8004-blame-with-conflicts.sh
@@ -66,8 +66,8 @@ test_expect_success \
git blame file2
'
-test_expect_success 'blame runs on conflicted file in stages 1,3' '
- git blame file1
+test_expect_success 'blame does not crash with conflicted file in stages 1,3' '
+ test_must_fail git blame file1
'
test_done