Skip to content

Commit 58166f6

Browse files
kbleespatthoyts
authored andcommitted
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 <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 949df9c commit 58166f6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

t/annotate-tests.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -202,27 +202,27 @@ test_expect_success 'blame -L X,-N' '
202202
'
203203

204204
test_expect_success 'blame -L /RE/ (RE to end)' '
205-
check_count -L/evil/ C 1 "A U Thor" 1
205+
check_count -L/\;*evil/ C 1 "A U Thor" 1
206206
'
207207

208208
test_expect_success 'blame -L /RE/,/RE2/' '
209-
check_count -L/robot/,/green/ A 1 B 1 B2 1 D 1 E 1
209+
check_count -L/\;*robot/,/\;*green/ A 1 B 1 B2 1 D 1 E 1
210210
'
211211

212212
test_expect_success 'blame -L X,/RE/' '
213-
check_count -L5,/evil/ B1 1 D 1 "A U Thor" 1
213+
check_count -L5,/\;*evil/ B1 1 D 1 "A U Thor" 1
214214
'
215215

216216
test_expect_success 'blame -L /RE/,Y' '
217-
check_count -L/99/,7 B1 1 D 1 "A U Thor" 1
217+
check_count -L/\;*99/,7 B1 1 D 1 "A U Thor" 1
218218
'
219219

220220
test_expect_success 'blame -L /RE/,+N' '
221-
check_count -L/99/,+3 B1 1 D 1 "A U Thor" 1
221+
check_count -L/\;*99/,+3 B1 1 D 1 "A U Thor" 1
222222
'
223223

224224
test_expect_success 'blame -L /RE/,-N' '
225-
check_count -L/99/,-3 B 1 B2 1 D 1
225+
check_count -L/\;*99/,-3 B 1 B2 1 D 1
226226
'
227227

228228
test_expect_success 'blame -L X (X > nlines)' '

0 commit comments

Comments
 (0)