mirror of
https://github.com/git/git.git
synced 2026-02-14 20:01:42 +00:00
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 <johannes.schindelin@gmx.de> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
committed by
Pat Thoyts
parent
949df9ce47
commit
58166f67c2
@@ -202,27 +202,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
|
||||
'
|
||||
|
||||
test_expect_success 'blame -L X (X > nlines)' '
|
||||
|
||||
Reference in New Issue
Block a user