Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit 764f3d6

Browse files
kbleeskasal
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 557305b commit 764f3d6

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

t/annotate-tests.sh

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -251,27 +251,27 @@ test_expect_success 'blame -L X,-N' '
251251
'
252252

253253
test_expect_success 'blame -L /RE/ (RE to end)' '
254-
check_count -L/evil/ C 1 "A U Thor" 1
254+
check_count -L/\;*evil/ C 1 "A U Thor" 1
255255
'
256256

257257
test_expect_success 'blame -L /RE/,/RE2/' '
258-
check_count -L/robot/,/green/ A 1 B 1 B2 1 D 1 E 1
258+
check_count -L/\;*robot/,/\;*green/ A 1 B 1 B2 1 D 1 E 1
259259
'
260260

261261
test_expect_success 'blame -L X,/RE/' '
262-
check_count -L5,/evil/ B1 1 D 1 "A U Thor" 1
262+
check_count -L5,/\;*evil/ B1 1 D 1 "A U Thor" 1
263263
'
264264

265265
test_expect_success 'blame -L /RE/,Y' '
266-
check_count -L/99/,7 B1 1 D 1 "A U Thor" 1
266+
check_count -L/\;*99/,7 B1 1 D 1 "A U Thor" 1
267267
'
268268

269269
test_expect_success 'blame -L /RE/,+N' '
270-
check_count -L/99/,+3 B1 1 D 1 "A U Thor" 1
270+
check_count -L/\;*99/,+3 B1 1 D 1 "A U Thor" 1
271271
'
272272

273273
test_expect_success 'blame -L /RE/,-N' '
274-
check_count -L/99/,-3 B 1 B2 1 D 1
274+
check_count -L/\;*99/,-3 B 1 B2 1 D 1
275275
'
276276

277277
# 'file' ends with an incomplete line, so 'wc' reports one fewer lines than
@@ -337,31 +337,31 @@ test_expect_success 'blame -L multiple (superset/subset: unordered)' '
337337
'
338338

339339
test_expect_success 'blame -L /RE/ (relative)' '
340-
check_count -L3,3 -L/fox/ B1 1 B2 1 C 1 D 1 "A U Thor" 1
340+
check_count -L3,3 -L/\;*fox/ B1 1 B2 1 C 1 D 1 "A U Thor" 1
341341
'
342342

343343
test_expect_success 'blame -L /RE/ (relative: no preceding range)' '
344-
check_count -L/dog/ A 1 B 1 B1 1 B2 1 C 1 D 1 "A U Thor" 1
344+
check_count -L/\;*dog/ A 1 B 1 B1 1 B2 1 C 1 D 1 "A U Thor" 1
345345
'
346346

347347
test_expect_success 'blame -L /RE/ (relative: adjacent)' '
348-
check_count -L1,1 -L/dog/,+1 A 1 E 1
348+
check_count -L1,1 -L/\;*dog/,+1 A 1 E 1
349349
'
350350

351351
test_expect_success 'blame -L /RE/ (relative: not found)' '
352-
test_must_fail $PROG -L4,4 -L/dog/ file
352+
test_must_fail $PROG -L4,4 -L/\;*dog/ file
353353
'
354354

355355
test_expect_success 'blame -L /RE/ (relative: end-of-file)' '
356356
test_must_fail $PROG -L, -L/$/ file
357357
'
358358

359359
test_expect_success 'blame -L ^/RE/ (absolute)' '
360-
check_count -L3,3 -L^/dog/,+2 A 1 B2 1
360+
check_count -L3,3 -L^/\;*dog/,+2 A 1 B2 1
361361
'
362362

363363
test_expect_success 'blame -L ^/RE/ (absolute: no preceding range)' '
364-
check_count -L^/dog/,+2 A 1 B2 1
364+
check_count -L^/\;*dog/,+2 A 1 B2 1
365365
'
366366

367367
test_expect_success 'blame -L ^/RE/ (absolute: not found)' '

0 commit comments

Comments
 (0)