Skip to content

Commit c312f3d

Browse files
committed
Leave Git's :name and :/message arguments alone, please
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 707f9b2 commit c312f3d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

winsup/cygwin/msys2_path_conv.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,12 @@ path_type find_path_start_and_type(const char** src, int recurse, const char* en
348348
return NONE;
349349
}
350350

351+
/*
352+
* Prevent Git's :file.txt and :/message syntax from beeing modified.
353+
*/
354+
if (*it == ':')
355+
goto skip_p2w;
356+
351357
while (!isalnum(*it) && *it != '/' && *it != '\\' && *it != ':' && *it != '-' && *it != '.') {
352358
recurse = true;
353359
it = ++*src;

0 commit comments

Comments
 (0)