From 809f4f94a2fddf58bbae3d1b96457877ce42210c Mon Sep 17 00:00:00 2001 From: Karsten Blees Date: Tue, 10 Sep 2013 13:50:19 -0500 Subject: [PATCH] t800[12]: work around MSys limitation MSys works very hard to convert Unix-style paths into DOS-style ones. *Very* hard. So hard, indeed, that git blame -L/hello/,/green/ is translated into something like git blame -LC:/msysgit/hello/,C:/msysgit/green/ As seen in msys_p2w in src\msys\msys\rt\src\winsup\cygwin\path.cc, line 3204ff: case '-': // // here we check for POSIX paths as attributes to a POSIX switch. // ... seemingly absolute POSIX paths in single-letter options get expanded by msys.dll unless they contain '=' or ';'. So a quick and very dirty fix is to use '-L/;*evil/'. (Using an equal sign works only when it is before a comma, so in the above example, /=*green/ would still be converted to a DOS-style path.) Commit-message-by: Johannes Schindelin Signed-off-by: Johannes Schindelin --- t/annotate-tests.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/t/annotate-tests.sh b/t/annotate-tests.sh index 093832fef1..a669f62beb 100644 --- a/t/annotate-tests.sh +++ b/t/annotate-tests.sh @@ -274,27 +274,27 @@ test_expect_success 'blame -L X,-N' ' ' test_expect_success 'blame -L /RE/ (RE to end)' ' - check_count -L/evil/ C 1 "A U Thor" 1 + check_count -L/\;*evil/ C 1 "A U Thor" 1 ' test_expect_success 'blame -L /RE/,/RE2/' ' - check_count -L/robot/,/green/ A 1 B 1 B2 1 D 1 E 1 + check_count -L/\;*robot/,/\;*green/ A 1 B 1 B2 1 D 1 E 1 ' test_expect_success 'blame -L X,/RE/' ' - check_count -L5,/evil/ B1 1 D 1 "A U Thor" 1 + check_count -L5,/\;*evil/ B1 1 D 1 "A U Thor" 1 ' test_expect_success 'blame -L /RE/,Y' ' - check_count -L/99/,7 B1 1 D 1 "A U Thor" 1 + check_count -L/\;*99/,7 B1 1 D 1 "A U Thor" 1 ' test_expect_success 'blame -L /RE/,+N' ' - check_count -L/99/,+3 B1 1 D 1 "A U Thor" 1 + check_count -L/\;*99/,+3 B1 1 D 1 "A U Thor" 1 ' test_expect_success 'blame -L /RE/,-N' ' - check_count -L/99/,-3 B 1 B2 1 D 1 + check_count -L/\;*99/,-3 B 1 B2 1 D 1 ' # 'file' ends with an incomplete line, so 'wc' reports one fewer lines than @@ -360,19 +360,19 @@ test_expect_success 'blame -L multiple (superset/subset: unordered)' ' ' test_expect_success 'blame -L /RE/ (relative)' ' - check_count -L3,3 -L/fox/ B1 1 B2 1 C 1 D 1 "A U Thor" 1 + check_count -L3,3 -L/\;*fox/ B1 1 B2 1 C 1 D 1 "A U Thor" 1 ' test_expect_success 'blame -L /RE/ (relative: no preceding range)' ' - check_count -L/dog/ A 1 B 1 B1 1 B2 1 C 1 D 1 "A U Thor" 1 + check_count -L/\;*dog/ A 1 B 1 B1 1 B2 1 C 1 D 1 "A U Thor" 1 ' test_expect_success 'blame -L /RE/ (relative: adjacent)' ' - check_count -L1,1 -L/dog/,+1 A 1 E 1 + check_count -L1,1 -L/\;*dog/,+1 A 1 E 1 ' test_expect_success 'blame -L /RE/ (relative: not found)' ' - test_must_fail $PROG -L4,4 -L/dog/ file + test_must_fail $PROG -L4,4 -L/\;*dog/ file ' test_expect_success 'blame -L /RE/ (relative: end-of-file)' ' @@ -380,11 +380,11 @@ test_expect_success 'blame -L /RE/ (relative: end-of-file)' ' ' test_expect_success 'blame -L ^/RE/ (absolute)' ' - check_count -L3,3 -L^/dog/,+2 A 1 B2 1 + check_count -L3,3 -L^/\;*dog/,+2 A 1 B2 1 ' test_expect_success 'blame -L ^/RE/ (absolute: no preceding range)' ' - check_count -L^/dog/,+2 A 1 B2 1 + check_count -L^/\;*dog/,+2 A 1 B2 1 ' test_expect_success 'blame -L ^/RE/ (absolute: not found)' '