From 106811d986c2db6403a0fe49b110a96afe51d2e3 Mon Sep 17 00:00:00 2001 From: Steffen Prohaska Date: Sun, 4 May 2008 15:48:30 +0200 Subject: [PATCH] Tweak msys_p2w to retain ":/" and "::" This commits brings a tweaked msys-1.0.dll in which MSYS's path convertsion function msys_p2w is tailored to retain some git specific arguments. ":/message" (see t7201-co.sh "checkout to detach HEAD with :/message") "::" (see t5511-refspec.sh) now work. msys-1.0.dll was built as desribed on http://www.mingw.org/MinGWiki/index.php/Build%20MSYS. msys_p2w was modified with 0001-Tweak-msys_p2w-for-msysgit.patch included in this commit. Signed-off-by: Steffen Prohaska --- .../patches/0001-Tweak-msys_p2w-for-msysgit.patch | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 src/rt/patches/0001-Tweak-msys_p2w-for-msysgit.patch diff --git a/src/rt/patches/0001-Tweak-msys_p2w-for-msysgit.patch b/src/rt/patches/0001-Tweak-msys_p2w-for-msysgit.patch new file mode 100644 index 00000000..c1a045bd --- /dev/null +++ b/src/rt/patches/0001-Tweak-msys_p2w-for-msysgit.patch @@ -0,0 +1,41 @@ +From f69d49282f0bafa601a53e29797989c9960f61a7 Mon Sep 17 00:00:00 2001 +From: Steffen Prohaska +Date: Sun, 4 May 2008 14:02:45 +0200 +Subject: [PATCH] Tweak msys_p2w for msysgit + +--- + src/winsup/cygwin/path.cc | 8 ++++++-- + 1 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/src/winsup/cygwin/path.cc b/src/winsup/cygwin/path.cc +index e701360..582ea77 100644 +--- a/src/winsup/cygwin/path.cc ++++ b/src/winsup/cygwin/path.cc +@@ -3134,10 +3134,13 @@ msys_p2w (char const * const path) + // + // Prevent http://some.string/ from being modified. + // +- if ((sspath > 0 && strlen (sspath) > 2) ++ if (((sspath > 0 && strlen (sspath) > 2) + && (sspath[1] == '/') + && (sspath[2] == '/') + ) ++ // Prevent git's :/message syntax from beeing modified. ++ || (strlen (spath) > 1 && spath[0] == ':' && spath[1] == '/') ++ ) + { + debug_printf("returning: %s", path); + return ((char *)path); +@@ -3153,7 +3156,8 @@ msys_p2w (char const * const path) + // + // Prevent ``foo:echo /bar/baz'' from being considered a path list. + // +- && (strlen (sspath) > 1 && strchr (":./", sspath[1]) > 0) ++ // Prevent :: from beeing considered a path list [msysgit]. ++ && (strlen (sspath) > 1 && strchr ("./", sspath[1]) > 0) + ) + { + // +-- +1.5.5.1025.g3502 + -- 2.11.4.GIT