Skip to content

Commit 9ee8a80

Browse files
committed
Also leave Git's <rev>:./<name> syntax alone
This fixes Git's t1506-rev-parse-diagnosis.sh Signed-off-by: Johannes Schindelin <[email protected]>
1 parent e24f358 commit 9ee8a80

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

winsup/cygwin/msys2_path_conv.cc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,14 @@ path_type find_path_start_and_type(const char** src, int recurse, const char* en
366366
// Avoid mangling IPv6 addresses
367367
if (it + 1 < end && it[1] == ':')
368368
goto skip_p2w;
369+
370+
// Leave Git's <rev>:./name syntax alone
371+
if (it + 1 < end && it[1] == '.') {
372+
if (it + 2 < end && it[2] == '/')
373+
goto skip_p2w;
374+
if (it + 3 < end && it[2] == '.' && it[3] == '/')
375+
goto skip_p2w;
376+
}
369377
break;
370378
++it;
371379
}

0 commit comments

Comments
 (0)