{"thread":{"id":"41254","subject":"[PATCH 00/19] Let Git's tests pass on Windows","startedAt":"2016-01-24T15:43:06Z","lastAt":"2016-01-28T21:37:09Z","messageCount":113,"participants":["Johannes Schindelin","Philip Oakley","Johannes Sixt","Junio C Hamano","Eric Sunshine","Ray Donnelly"],"isPatch":true,"patchVersion":1,"patchTotal":19},"messages":[{"id":"276644","messageId":"cover.1453650173.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":null,"subject":"[PATCH 00/19] Let Git's tests pass on Windows","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-24T15:43:06Z","receivedAt":"2016-01-24T15:43:06Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"This is a big milestone. With these modifications, Git's source code\ndoes not only build without warnings in Git for Windows' SDK, but\npasses the entire regression test suite.\n\nThe patch series contains three different types of patches. First,\nthere are a couple of real fixes that were triggered by failures in\nthe regression tests. Then there are a couple of fixes to the\nregression tests themselves. And finally, we have to disable a couple\nof tests because we simply cannot make them work on Windows.\n\n\nJohannes Schindelin (13):\n  mingw: let's use gettext with MSYS2\n  mingw: do not trust MSYS2's MinGW gettext.sh\n  Git.pm: stop assuming that absolute paths start with a slash\n  mingw: prepare the TMPDIR environment variable for shell scripts\n  mingw: let lstat() fail with errno == ENOTDIR when appropriate\n  mingw: fix t5601-clone.sh\n  mingw: accomodate t0060-path-utils for MSYS2\n  mingw: disable mkfifo-based tests\n  tests: turn off git-daemon tests if FIFOs are not available\n  mingw: fix t9700's assumption about directory separators\n  mingw: work around pwd issues in the tests\n  mingw: skip a couple of git-svn tests that cannot pass on Windows\n  mingw: do not bother to test funny file names\n\nKarsten Blees (2):\n  mingw: factor out Windows specific environment setup\n  mingw: do not use symlinks with SVN in t9100\n\nPat Thoyts (1):\n  mingw: avoid absolute path in t0008\n\nThomas Braun (1):\n  mingw: outsmart MSYS2's path substitution in t1508\n\n마누엘 (2):\n  mingw: try to delete target directory before renaming\n  mingw: fix git-svn tests that expect chmod to work\n\n Makefile                              |  1 +\n compat/mingw.c                        | 91 +++++++++++++++++++++++++++++------\n config.mak.uname                      |  3 +-\n perl/Git.pm                           |  3 +-\n t/lib-git-daemon.sh                   |  5 ++\n t/t0008-ignores.sh                    |  8 ++-\n t/t0060-path-utils.sh                 | 37 ++++++++------\n t/t1508-at-combinations.sh            | 13 ++++-\n t/t3300-funny-names.sh                |  1 +\n t/t3600-rm.sh                         |  3 +-\n t/t3703-add-magic-pathspec.sh         |  2 +-\n t/t3902-quoted.sh                     |  1 +\n t/t4016-diff-quote.sh                 |  1 +\n t/t4135-apply-weird-filenames.sh      |  3 +-\n t/t5601-clone.sh                      | 18 +++----\n t/t7800-difftool.sh                   | 14 +++---\n t/t9100-git-svn-basic.sh              | 29 +++++++----\n t/t9118-git-svn-funky-branch-names.sh | 12 +++--\n t/t9124-git-svn-dcommit-auto-props.sh | 20 ++++++--\n t/t9130-git-svn-authors-file.sh       |  2 +-\n t/t9200-git-cvsexportcommit.sh        |  2 +-\n t/t9400-git-cvsserver-server.sh       |  6 +--\n t/t9401-git-cvsserver-crlf.sh         |  6 +--\n t/t9402-git-cvsserver-refs.sh         |  6 +--\n t/t9700/test.pl                       |  2 +-\n t/t9903-bash-prompt.sh                |  2 +-\n t/test-lib.sh                         |  2 +-\n test-fake-ssh.c                       | 30 ++++++++++++\n 28 files changed, 238 insertions(+), 85 deletions(-)\n create mode 100644 test-fake-ssh.c\n\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276647","messageId":"7162dcb55e6a317cba840ef1176d09d99fc37f6b.1453650173.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453650173.git.johannes.schindelin@gmx.de","subject":"[PATCH 01/19] mingw: let's use gettext with MSYS2","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-24T15:43:13Z","receivedAt":"2016-01-24T15:43:13Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"This solves two problems:\n\n- we now have proper localisation even on Windows\n\n- we sidestep the infamous \"BUG: your vsnprintf is broken (returned -1)\"\n  message when running \"git init\" (which otherwise prevents the entire\n  test suite from running)\n\nThe latter issue is rather crucial, as *no* test passes in Git for\nWindows without this fix.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n config.mak.uname | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/config.mak.uname b/config.mak.uname\nindex 4b2e1b8..6b25661 100644\n--- a/config.mak.uname\n+++ b/config.mak.uname\n@@ -560,7 +560,7 @@ else\n \t\tNO_R_TO_GCC_LINKER = YesPlease\n \t\tINTERNAL_QSORT = YesPlease\n \t\tHAVE_LIBCHARSET_H = YesPlease\n-\t\tNO_GETTEXT = YesPlease\n+\t\tNO_GETTEXT =\n \t\tUSE_LIBPCRE= YesPlease\n \t\tNO_CURL =\n \t\tUSE_NED_ALLOCATOR = YesPlease\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276645","messageId":"3a064c5328909399551b05d40a2fa538bf7dff61.1453650173.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453650173.git.johannes.schindelin@gmx.de","subject":"[PATCH 02/19] mingw: do not trust MSYS2's MinGW gettext.sh","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-24T15:43:19Z","receivedAt":"2016-01-24T15:43:19Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"It does not quite work because it produces DOS line endings which the\nshell does not like at all.\n\nThis lets t0200-gettext-basic.sh, t0204-gettext-reencode-sanity.sh,\nt3406-rebase-message.sh, t3903-stash.sh, t7400-submodule-basic.sh,\nt7401-submodule-summary.sh, t7406-submodule-update.sh and\nt7407-submodule-foreach.sh pass in Git for Windows' SDK.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n config.mak.uname | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/config.mak.uname b/config.mak.uname\nindex 6b25661..d6f7980 100644\n--- a/config.mak.uname\n+++ b/config.mak.uname\n@@ -561,6 +561,7 @@ else\n \t\tINTERNAL_QSORT = YesPlease\n \t\tHAVE_LIBCHARSET_H = YesPlease\n \t\tNO_GETTEXT =\n+\t\tUSE_GETTEXT_SCHEME = fallthrough\n \t\tUSE_LIBPCRE= YesPlease\n \t\tNO_CURL =\n \t\tUSE_NED_ALLOCATOR = YesPlease\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276648","messageId":"75e3562d45097de8b166b57ff6f475bb87666ce0.1453650173.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453650173.git.johannes.schindelin@gmx.de","subject":"[PATCH 03/19] Git.pm: stop assuming that absolute paths start with a slash","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-24T15:43:26Z","receivedAt":"2016-01-24T15:43:26Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"On Windows, absolute paths never start with a slash, unless a POSIX\nemulation layer is used. The latter is the case for MSYS2's Perl that\nGit for Windows leverages. However, in the tests we also go through\nplain `git.exe`, which does *not* leverage the POSIX emulation layer,\nand therefore the paths we pass to Perl may actually be DOS-style paths\nsuch as C:/Program Files/Git.\n\nSo let's just use Perl's own way to test whether a given path is\nabsolute or not instead of home-brewing our own.\n\nThis patch partially fixes t7800 and t9700 when running in Git for\nWindows' SDK.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n perl/Git.pm | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/perl/Git.pm b/perl/Git.pm\nindex 19ef081..49eb88a 100644\n--- a/perl/Git.pm\n+++ b/perl/Git.pm\n@@ -188,7 +188,8 @@ sub repository {\n \t\t};\n \n \t\tif ($dir) {\n-\t\t\t$dir =~ m#^/# or $dir = $opts{Directory} . '/' . $dir;\n+\t\t\t_verify_require();\n+\t\t\tFile::Spec->file_name_is_absolute($dir) or $dir = $opts{Directory} . '/' . $dir;\n \t\t\t$opts{Repository} = abs_path($dir);\n \n \t\t\t# If --git-dir went ok, this shouldn't die either.\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276646","messageId":"7edbc873fe214e1a49bbde4f040a35f9bccb151e.1453650173.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453650173.git.johannes.schindelin@gmx.de","subject":"[PATCH 04/19] mingw: factor out Windows specific environment setup","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-24T15:43:31Z","receivedAt":"2016-01-24T15:43:31Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Karsten Blees <blees@dcon.de>\n\nWe will add more environment-related code to that new function\nin the next patch.\n\nSigned-off-by: Karsten Blees <blees@dcon.de>\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n compat/mingw.c | 30 +++++++++++++++++-------------\n 1 file changed, 17 insertions(+), 13 deletions(-)\n\ndiff --git a/compat/mingw.c b/compat/mingw.c\nindex 8437c9a..a12197e 100644\n--- a/compat/mingw.c\n+++ b/compat/mingw.c\n@@ -2040,6 +2040,22 @@ int xwcstoutf(char *utf, const wchar_t *wcs, size_t utflen)\n \treturn -1;\n }\n \n+static void setup_windows_environment()\n+{\n+\t/* on Windows it is TMP and TEMP */\n+\tif (!getenv(\"TMPDIR\")) {\n+\t\tconst char *tmp = getenv(\"TMP\");\n+\t\tif (!tmp)\n+\t\t\ttmp = getenv(\"TEMP\");\n+\t\tif (tmp)\n+\t\t\tsetenv(\"TMPDIR\", tmp, 1);\n+\t}\n+\n+\t/* simulate TERM to enable auto-color (see color.c) */\n+\tif (!getenv(\"TERM\"))\n+\t\tsetenv(\"TERM\", \"cygwin\", 1);\n+}\n+\n /*\n  * Disable MSVCRT command line wildcard expansion (__getmainargs called from\n  * mingw startup code, see init.c in mingw runtime).\n@@ -2118,19 +2134,7 @@ void mingw_startup()\n \tqsort(environ, i, sizeof(char*), compareenv);\n \n \t/* fix Windows specific environment settings */\n-\n-\t/* on Windows it is TMP and TEMP */\n-\tif (!mingw_getenv(\"TMPDIR\")) {\n-\t\tconst char *tmp = mingw_getenv(\"TMP\");\n-\t\tif (!tmp)\n-\t\t\ttmp = mingw_getenv(\"TEMP\");\n-\t\tif (tmp)\n-\t\t\tsetenv(\"TMPDIR\", tmp, 1);\n-\t}\n-\n-\t/* simulate TERM to enable auto-color (see color.c) */\n-\tif (!getenv(\"TERM\"))\n-\t\tsetenv(\"TERM\", \"cygwin\", 1);\n+\tsetup_windows_environment();\n \n \t/* initialize critical section for waitpid pinfo_t list */\n \tInitializeCriticalSection(&pinfo_cs);\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276649","messageId":"80795bee09974f4bec6bda75fe9cb17a4326bed1.1453650173.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453650173.git.johannes.schindelin@gmx.de","subject":"[PATCH 05/19] mingw: prepare the TMPDIR environment variable for shell scripts","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-24T15:43:37Z","receivedAt":"2016-01-24T15:43:37Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"When shell scripts access a $TMPDIR variable containing backslashes,\nthey will be mistaken for escape characters. Let's not let that happen\nby converting them to forward slashes.\n\nThis partially fixes t7800 with MSYS2.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n compat/mingw.c | 23 +++++++++++++++++++----\n 1 file changed, 19 insertions(+), 4 deletions(-)\n\ndiff --git a/compat/mingw.c b/compat/mingw.c\nindex a12197e..db92f5d 100644\n--- a/compat/mingw.c\n+++ b/compat/mingw.c\n@@ -2042,13 +2042,28 @@ int xwcstoutf(char *utf, const wchar_t *wcs, size_t utflen)\n \n static void setup_windows_environment()\n {\n+\tchar *tmp = getenv(\"TMPDIR\");\n+\n \t/* on Windows it is TMP and TEMP */\n-\tif (!getenv(\"TMPDIR\")) {\n-\t\tconst char *tmp = getenv(\"TMP\");\n-\t\tif (!tmp)\n+\tif (tmp) {\n+\t\tif (!(tmp = getenv(\"TMP\")))\n \t\t\ttmp = getenv(\"TEMP\");\n-\t\tif (tmp)\n+\t\tif (tmp) {\n \t\t\tsetenv(\"TMPDIR\", tmp, 1);\n+\t\t\ttmp = getenv(\"TMPDIR\");\n+\t\t}\n+\t}\n+\n+\tif (tmp) {\n+\t\t/*\n+\t\t * Convert all dir separators to forward slashes,\n+\t\t * to help shell commands called from the Git\n+\t\t * executable (by not mistaking the dir separators\n+\t\t * for escape characters).\n+\t\t */\n+\t\tfor (; *tmp; tmp++)\n+\t\t\tif (*tmp == '\\\\')\n+\t\t\t\t*tmp = '/';\n \t}\n \n \t/* simulate TERM to enable auto-color (see color.c) */\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276650","messageId":"d75b0dc0b76beefee9e705555ca4f2fa4f4b96ce.1453650173.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453650173.git.johannes.schindelin@gmx.de","subject":"[PATCH 06/19] mingw: try to delete target directory before renaming","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-24T15:44:31Z","receivedAt":"2016-01-24T15:44:31Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: 마누엘 <nalla@users.noreply.github.com>\n\nWhen the rename() function tries to move a directory it fails if the\ntarget directory exists. It should check if it can delete the (possibly\nempty) target directory and then try again to move the directory.\n\nThis partially fixes t9100-git-svn-basic.sh.\n\nSigned-off-by: 마누엘 <nalla@users.noreply.github.com>\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n compat/mingw.c | 7 ++++++-\n 1 file changed, 6 insertions(+), 1 deletion(-)\n\ndiff --git a/compat/mingw.c b/compat/mingw.c\nindex db92f5d..e4839b9 100644\n--- a/compat/mingw.c\n+++ b/compat/mingw.c\n@@ -1603,7 +1603,12 @@ repeat:\n \tif (gle == ERROR_ACCESS_DENIED &&\n \t    (attrs = GetFileAttributesW(wpnew)) != INVALID_FILE_ATTRIBUTES) {\n \t\tif (attrs & FILE_ATTRIBUTE_DIRECTORY) {\n-\t\t\terrno = EISDIR;\n+\t\t\tDWORD attrsold = GetFileAttributesW(wpold);\n+\t\t\tif (attrsold == INVALID_FILE_ATTRIBUTES ||\n+\t\t\t    !(attrsold & FILE_ATTRIBUTE_DIRECTORY))\n+\t\t\t\terrno = EISDIR;\n+\t\t\telse if (!_wrmdir(wpnew))\n+\t\t\t\tgoto repeat;\n \t\t\treturn -1;\n \t\t}\n \t\tif ((attrs & FILE_ATTRIBUTE_READONLY) &&\n-- \n2.7.0.windows.1.7.g55a05c8\n\n"},{"id":"276651","messageId":"d723c85ea89699e9fe4c0535881bf48758adab5d.1453650173.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453650173.git.johannes.schindelin@gmx.de","subject":"[PATCH 07/19] mingw: let lstat() fail with errno == ENOTDIR when appropriate","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-24T15:44:37Z","receivedAt":"2016-01-24T15:44:37Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"POSIX semantics requires lstat() to fail with ENOTDIR when \"[a]\ncomponent of the path prefix names an existing file that is neither a\ndirectory nor a symbolic link to a directory\".\n\nSee http://pubs.opengroup.org/onlinepubs/9699919799/functions/lstat.html\n\nThis behavior is expected by t1404-update-ref-df-conflicts now.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n compat/mingw.c | 39 +++++++++++++++++++++++++++++++++++++++\n 1 file changed, 39 insertions(+)\n\ndiff --git a/compat/mingw.c b/compat/mingw.c\nindex e4839b9..9e60335 100644\n--- a/compat/mingw.c\n+++ b/compat/mingw.c\n@@ -454,6 +454,39 @@ static inline time_t filetime_to_time_t(const FILETIME *ft)\n \treturn (time_t)(filetime_to_hnsec(ft) / 10000000);\n }\n \n+/**\n+ * Verifies that safe_create_leading_directories() would succeed.\n+ */\n+static int has_valid_directory_prefix(wchar_t *wfilename)\n+{\n+\tint n = wcslen(wfilename);\n+\n+\twhile (n > 0) {\n+\t\twchar_t c = wfilename[--n];\n+\t\tDWORD attributes;\n+\n+\t\tif (!is_dir_sep(c))\n+\t\t\tcontinue;\n+\n+\t\twfilename[n] = L'\\0';\n+\t\tattributes = GetFileAttributesW(wfilename);\n+\t\twfilename[n] = c;\n+\t\tif (attributes == FILE_ATTRIBUTE_DIRECTORY ||\n+\t\t\t\tattributes == FILE_ATTRIBUTE_DEVICE)\n+\t\t\treturn 1;\n+\t\tif (attributes == INVALID_FILE_ATTRIBUTES)\n+\t\t\tswitch (GetLastError()) {\n+\t\t\tcase ERROR_PATH_NOT_FOUND:\n+\t\t\t\tcontinue;\n+\t\t\tcase ERROR_FILE_NOT_FOUND:\n+\t\t\t\t/* This implies parent directory exists. */\n+\t\t\t\treturn 1;\n+\t\t\t}\n+\t\treturn 0;\n+\t}\n+\treturn 1;\n+}\n+\n /* We keep the do_lstat code in a separate function to avoid recursion.\n  * When a path ends with a slash, the stat will fail with ENOENT. In\n  * this case, we strip the trailing slashes and stat again.\n@@ -514,6 +547,12 @@ static int do_lstat(int follow, const char *file_name, struct stat *buf)\n \tcase ERROR_NOT_ENOUGH_MEMORY:\n \t\terrno = ENOMEM;\n \t\tbreak;\n+\tcase ERROR_PATH_NOT_FOUND:\n+\t\tif (!has_valid_directory_prefix(wfilename)) {\n+\t\t\terrno = ENOTDIR;\n+\t\t\tbreak;\n+\t\t}\n+\t\t/* fallthru */\n \tdefault:\n \t\terrno = ENOENT;\n \t\tbreak;\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276652","messageId":"d93a4be1aef3560841305d9c279ea470bc22538c.1453650173.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453650173.git.johannes.schindelin@gmx.de","subject":"[PATCH 08/19] mingw: fix t5601-clone.sh","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-24T15:44:42Z","receivedAt":"2016-01-24T15:44:42Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Since baaf233 (connect: improve check for plink to reduce false\npositives, 2015-04-26), t5601 writes out a `plink.exe` for testing that\nis actually a shell script. So the assumption that the `.exe` extension\nimplies that the file is *not* a shell script is now wrong.\n\nSince there was no love for the idea of allowing `.exe` files to be\nshell scripts on Windows, let's go the other way round: *make*\n`plink.exe` a real `.exe`.\n\nThis fixes t5601-clone.sh in Git for Windows' SDK.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n Makefile         |  1 +\n t/t5601-clone.sh | 18 ++++++++----------\n test-fake-ssh.c  | 30 ++++++++++++++++++++++++++++++\n 3 files changed, 39 insertions(+), 10 deletions(-)\n create mode 100644 test-fake-ssh.c\n\ndiff --git a/Makefile b/Makefile\nindex fc2f1ab..10566d6 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -583,6 +583,7 @@ TEST_PROGRAMS_NEED_X += test-delta\n TEST_PROGRAMS_NEED_X += test-dump-cache-tree\n TEST_PROGRAMS_NEED_X += test-dump-split-index\n TEST_PROGRAMS_NEED_X += test-dump-untracked-cache\n+TEST_PROGRAMS_NEED_X += test-fake-ssh\n TEST_PROGRAMS_NEED_X += test-genrandom\n TEST_PROGRAMS_NEED_X += test-hashmap\n TEST_PROGRAMS_NEED_X += test-index-version\ndiff --git a/t/t5601-clone.sh b/t/t5601-clone.sh\nindex 669ec9b..2f4272a 100755\n--- a/t/t5601-clone.sh\n+++ b/t/t5601-clone.sh\n@@ -4,6 +4,9 @@ test_description=clone\n \n . ./test-lib.sh\n \n+X=\n+! test_have_prereq MINGW || X=.exe\n+\n test_expect_success setup '\n \n \trm -fr .git &&\n@@ -305,14 +308,9 @@ test_expect_success 'clone checking out a tag' '\n \n setup_ssh_wrapper () {\n \ttest_expect_success 'setup ssh wrapper' '\n-\t\twrite_script \"$TRASH_DIRECTORY/ssh-wrapper\" <<-\\EOF &&\n-\t\techo >>\"$TRASH_DIRECTORY/ssh-output\" \"ssh: $*\" &&\n-\t\t# throw away all but the last argument, which should be the\n-\t\t# command\n-\t\twhile test $# -gt 1; do shift; done\n-\t\teval \"$1\"\n-\t\tEOF\n-\t\tGIT_SSH=\"$TRASH_DIRECTORY/ssh-wrapper\" &&\n+\t\tcp \"$GIT_BUILD_DIR/test-fake-ssh$X\" \\\n+\t\t\t\"$TRASH_DIRECTORY/ssh-wrapper$X\" &&\n+\t\tGIT_SSH=\"$TRASH_DIRECTORY/ssh-wrapper$X\" &&\n \t\texport GIT_SSH &&\n \t\texport TRASH_DIRECTORY &&\n \t\t>\"$TRASH_DIRECTORY\"/ssh-output\n@@ -320,8 +318,8 @@ setup_ssh_wrapper () {\n }\n \n copy_ssh_wrapper_as () {\n-\tcp \"$TRASH_DIRECTORY/ssh-wrapper\" \"$1\" &&\n-\tGIT_SSH=\"$1\" &&\n+\tcp \"$TRASH_DIRECTORY/ssh-wrapper$X\" \"${1%$X}$X\" &&\n+\tGIT_SSH=\"${1%$X}$X\" &&\n \texport GIT_SSH\n }\n \ndiff --git a/test-fake-ssh.c b/test-fake-ssh.c\nnew file mode 100644\nindex 0000000..980de21\n--- /dev/null\n+++ b/test-fake-ssh.c\n@@ -0,0 +1,30 @@\n+#include \"git-compat-util.h\"\n+#include \"run-command.h\"\n+#include \"strbuf.h\"\n+\n+int main(int argc, char **argv)\n+{\n+\tconst char *trash_directory = getenv(\"TRASH_DIRECTORY\");\n+\tstruct strbuf buf = STRBUF_INIT;\n+\tFILE *f;\n+\tint i;\n+\tconst char *child_argv[] = { NULL, NULL };\n+\n+\t/* First, print all parameters into $TRASH_DIRECTORY/ssh-output */\n+\tif (!trash_directory)\n+\t\tdie(\"Need a TRASH_DIRECTORY!\");\n+\tstrbuf_addf(&buf, \"%s/ssh-output\", trash_directory);\n+\tf = fopen(buf.buf, \"w\");\n+\tif (!f)\n+\t\tdie(\"Could not write to %s\", buf.buf);\n+\tfor (i = 0; i < argc; i++)\n+\t\tfprintf(f, \"%s%s\", i > 0 ? \" \" : \"\", i > 0 ? argv[i] : \"ssh:\");\n+\tfprintf(f, \"\\n\");\n+\tfclose(f);\n+\n+\t/* Now, evaluate the *last* parameter */\n+\tif (argc < 2)\n+\t\treturn 0;\n+\tchild_argv[0] = argv[argc - 1];\n+\treturn run_command_v_opt(child_argv, RUN_USING_SHELL);\n+}\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276653","messageId":"12c030323940de4a0845eda9bdd7b67c4e90864a.1453650173.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453650173.git.johannes.schindelin@gmx.de","subject":"[PATCH 09/19] mingw: accomodate t0060-path-utils for MSYS2","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-24T15:44:49Z","receivedAt":"2016-01-24T15:44:49Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"On Windows, there are no POSIX paths, only Windows ones (an absolute\nWindows path looks like \"C:\\Program Files\\Git\\ReleaseNotes.html\", under\nmost circumstances, forward slashes are also allowed and synonymous to\nbackslashes).\n\nSo when a POSIX shell (such as MSYS2's Bash, which is used by Git for\nWindows to execute all those shell scripts that are part of Git) passes\na POSIX path to test-path-utils.exe (which is not POSIX-aware), the path\nis translated into a Windows path. For example, /etc/profile becomes\nC:/Program Files/Git/etc/profile.\n\nThis path translation poses a problem when passing the root directory as\nparameter to test-path-utils.exe, as it is not well defined whether the\ntranslated root directory should end in a slash or not. MSys1 stripped\nthe trailing slash, but MSYS2 does not.\n\nTo work with both behaviors, we simply test what the current system does\nin the beginning of t0060-path-utils.sh and then adjust the expected\nlongest ancestor length accordingly.\n\nOriginally, the Git for Windows project patched MSYS2's runtime to\naccomodate Git's regression test, but we really should do it the other\nway round.\n\nThanks to Ray Donnelly for his patient help with this issue.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t0060-path-utils.sh | 37 ++++++++++++++++++++++---------------\n 1 file changed, 22 insertions(+), 15 deletions(-)\n\ndiff --git a/t/t0060-path-utils.sh b/t/t0060-path-utils.sh\nindex f0152a7..89d03e7 100755\n--- a/t/t0060-path-utils.sh\n+++ b/t/t0060-path-utils.sh\n@@ -7,6 +7,13 @@ test_description='Test various path utilities'\n \n . ./test-lib.sh\n \n+# On Windows, the root directory \"/\" is translated into a Windows directory.\n+# As it is not well-defined whether that Windows directory should end in a\n+# slash or not, let's test for that and adjust our expected longest ancestor\n+# length accordingly.\n+root_offset=0\n+case \"$(test-path-utils print_path /)\" in ?*/) root_offset=-1;; esac\n+\n norm_path() {\n \texpected=$(test-path-utils print_path \"$2\")\n \ttest_expect_success $3 \"normalize path: $1 => $2\" \\\n@@ -112,30 +119,30 @@ norm_path /d1/.../d2 /d1/.../d2\n norm_path /d1/..././../d2 /d1/d2\n \n ancestor / / -1\n-ancestor /foo / 0\n+ancestor /foo / $root_offset\n ancestor /foo /fo -1\n ancestor /foo /foo -1\n ancestor /foo /bar -1\n ancestor /foo /foo/bar -1\n ancestor /foo /foo:/bar -1\n-ancestor /foo /:/foo:/bar 0\n-ancestor /foo /foo:/:/bar 0\n-ancestor /foo /:/bar:/foo 0\n-ancestor /foo/bar / 0\n+ancestor /foo /:/foo:/bar $root_offset\n+ancestor /foo /foo:/:/bar $root_offset\n+ancestor /foo /:/bar:/foo $root_offset\n+ancestor /foo/bar / $root_offset\n ancestor /foo/bar /fo -1\n-ancestor /foo/bar /foo 4\n+ancestor /foo/bar /foo $((4+$root_offset))\n ancestor /foo/bar /foo/ba -1\n-ancestor /foo/bar /:/fo 0\n-ancestor /foo/bar /foo:/foo/ba 4\n+ancestor /foo/bar /:/fo $root_offset\n+ancestor /foo/bar /foo:/foo/ba $((4+$root_offset))\n ancestor /foo/bar /bar -1\n ancestor /foo/bar /fo -1\n-ancestor /foo/bar /foo:/bar 4\n-ancestor /foo/bar /:/foo:/bar 4\n-ancestor /foo/bar /foo:/:/bar 4\n-ancestor /foo/bar /:/bar:/fo 0\n-ancestor /foo/bar /:/bar 0\n-ancestor /foo/bar /foo 4\n-ancestor /foo/bar /foo:/bar 4\n+ancestor /foo/bar /foo:/bar $((4+$root_offset))\n+ancestor /foo/bar /:/foo:/bar $((4+$root_offset))\n+ancestor /foo/bar /foo:/:/bar $((4+$root_offset))\n+ancestor /foo/bar /:/bar:/fo $root_offset\n+ancestor /foo/bar /:/bar $root_offset\n+ancestor /foo/bar /foo $((4+$root_offset))\n+ancestor /foo/bar /foo:/bar $((4+$root_offset))\n ancestor /foo/bar /bar -1\n \n test_expect_success 'strip_path_suffix' '\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276654","messageId":"016ed650fa03b4a2a0d61a4aefff7f193df10bc3.1453650173.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453650173.git.johannes.schindelin@gmx.de","subject":"[PATCH 10/19] mingw: disable mkfifo-based tests","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-24T15:44:54Z","receivedAt":"2016-01-24T15:44:54Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"MSYS2 (the POSIX emulation layer used by Git for Windows' Bash) actually\nhas a working mkfifo. The only problem is that it is only emulating\nnamed pipes through the MSYS2 runtime; The Win32 API has no idea about\nnamed pipes, hence the Git executable cannot access those pipes either.\n\nThe symptom is that Git fails with a '<name>: No such file or directory'\nbecause MSYS2 emulates named pipes through special-crafted '.lnk' files.\n\nThe solution is to tell the test suite explicitly that we cannot use\nnamed pipes when we want to test on Windows.\n\nThis lets t4056-diff-order.sh, t9010-svn-fe.sh and t9300-fast-import.sh\npass.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/test-lib.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex bd4b02e..1470c8d 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -998,7 +998,7 @@ test_i18ngrep () {\n test_lazy_prereq PIPE '\n \t# test whether the filesystem supports FIFOs\n \tcase $(uname -s) in\n-\tCYGWIN*)\n+\tCYGWIN*|MINGW*)\n \t\tfalse\n \t\t;;\n \t*)\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276656","messageId":"71da2899ad82f527297a91d5362e6c38f10635cf.1453650173.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453650173.git.johannes.schindelin@gmx.de","subject":"[PATCH 11/19] tests: turn off git-daemon tests if FIFOs are not available","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-24T15:44:59Z","receivedAt":"2016-01-24T15:44:59Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"The Git daemon tests create a FIFO first thing and will hang if said\nFIFO is not available.\n\nThis is a problem with Git for Windows, where `mkfifo` is an MSYS2\nprogram that leverages MSYS2's POSIX emulation layer, but\n`git-daemon.exe` is a MINGW program that has not the first clue about\nthat POSIX emulation layer and therefore blinks twice when it sees\nMSYS2's emulated FIFOs and then just stares into space.\n\nThis lets t5570-git-daemon.sh and t5811-proto-disable-git.sh pass.\n\nSigned-off-by: Stepan Kasal <kasal@ucw.cz>\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/lib-git-daemon.sh | 5 +++++\n 1 file changed, 5 insertions(+)\n\ndiff --git a/t/lib-git-daemon.sh b/t/lib-git-daemon.sh\nindex bc4b341..9b1271c 100644\n--- a/t/lib-git-daemon.sh\n+++ b/t/lib-git-daemon.sh\n@@ -23,6 +23,11 @@ then\n \ttest_done\n fi\n \n+if ! test_have_prereq PIPE\n+then\n+\ttest_skip_or_die $GIT_TEST_GIT_DAEMON \"file system does not support FIFOs\"\n+fi\n+\n LIB_GIT_DAEMON_PORT=${LIB_GIT_DAEMON_PORT-${this_test#t}}\n \n GIT_DAEMON_PID=\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276655","messageId":"f016fde3118f5028b7e589f36bc9c916464a9de9.1453650173.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453650173.git.johannes.schindelin@gmx.de","subject":"[PATCH 12/19] mingw: do not use symlinks with SVN in t9100","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-24T15:45:04Z","receivedAt":"2016-01-24T15:45:04Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Karsten Blees <blees@dcon.de>\n\nThe SVN library does not seem to support symlinks, even if symlinks are\nenabled in MSYS2 and Git. Use 'cp' instead of 'ln -s'.\n\nThis partially fixes t/t9100-git-svn-basic.sh\n\nSigned-off-by: Karsten Blees <blees@dcon.de>\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t9100-git-svn-basic.sh | 9 ++++++++-\n 1 file changed, 8 insertions(+), 1 deletion(-)\n\ndiff --git a/t/t9100-git-svn-basic.sh b/t/t9100-git-svn-basic.sh\nindex 258d9b8..dbb440b 100755\n--- a/t/t9100-git-svn-basic.sh\n+++ b/t/t9100-git-svn-basic.sh\n@@ -25,7 +25,14 @@ test_expect_success \\\n \t(\n \t\tcd import &&\n \t\techo foo >foo &&\n-\t\tln -s foo foo.link\n+\t\tif test_have_prereq !MINGW\n+\t\tthen\n+\t\t\tln -s foo foo.link\n+\t\telse\n+\t\t\t# MSYS libsvn does not support symlinks, so always use cp, even if\n+\t\t\t# ln -s actually works\n+\t\t\tcp foo foo.link\n+\t\tfi\n \t\tmkdir -p dir/a/b/c/d/e &&\n \t\techo \"deep dir\" >dir/a/b/c/d/e/file &&\n \t\tmkdir bar &&\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276657","messageId":"1a4477f951edc9f58a24163d3935a7b35a3f14b2.1453650173.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453650173.git.johannes.schindelin@gmx.de","subject":"[PATCH 13/19] mingw: outsmart MSYS2's path substitution in t1508","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-24T15:45:09Z","receivedAt":"2016-01-24T15:45:09Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Thomas Braun <thomas.braun@byte-physics.de>\n\nA string of the form \"@/abcd\" is considered a file path\nby the msys layer and therefore translated to a Windows path.\n\nHere the trick is to double the slashes.\n\nThe MSYS2 patch translation can be studied by calling\n\n\ttest-path-utils print_path <path>\n\nSigned-off-by: Thomas Braun <thomas.braun@byte-physics.de>\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t1508-at-combinations.sh | 13 +++++++++++--\n 1 file changed, 11 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t1508-at-combinations.sh b/t/t1508-at-combinations.sh\nindex 078e119..1d9fd7b 100755\n--- a/t/t1508-at-combinations.sh\n+++ b/t/t1508-at-combinations.sh\n@@ -29,13 +29,22 @@ fail() {\n \t\"$@\" failure\n }\n \n+if test_have_prereq MINGW\n+then\n+\t# MSYS2 interprets `@/abc` to be a file list, and wants to substitute\n+\t# the Unix-y path with a Windows one (e.g. @C:\\msys64\\abc)\n+\tAT_SLASH=@//at-test\n+else\n+\tAT_SLASH=@/at-test\n+fi\n+\n test_expect_success 'setup' '\n \ttest_commit master-one &&\n \ttest_commit master-two &&\n \tgit checkout -b upstream-branch &&\n \ttest_commit upstream-one &&\n \ttest_commit upstream-two &&\n-\tgit checkout -b @/at-test &&\n+\tgit checkout -b $AT_SLASH &&\n \tgit checkout -b @@/at-test &&\n \tgit checkout -b @at-test &&\n \tgit checkout -b old-branch &&\n@@ -64,7 +73,7 @@ check \"@{-1}@{u}@{1}\" commit master-one\n check \"@\" commit new-two\n check \"@@{u}\" ref refs/heads/upstream-branch\n check \"@@/at-test\" ref refs/heads/@@/at-test\n-check \"@/at-test\" ref refs/heads/@/at-test\n+check \"$AT_SLASH\" ref refs/heads/@/at-test\n check \"@at-test\" ref refs/heads/@at-test\n nonsense \"@{u}@{-1}\"\n nonsense \"@{0}@{0}\"\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276658","messageId":"0435c425fb956743e077adeb2fc85cd7316d982c.1453650173.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453650173.git.johannes.schindelin@gmx.de","subject":"[PATCH 14/19] mingw: fix t9700's assumption about directory separators","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-24T15:45:14Z","receivedAt":"2016-01-24T15:45:14Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"This test assumed that there is only one directory separator (the\nforward slash), not two equivalent directory separators.\nHowever, on Windows, the back slash and the forward slash *are*\nequivalent.\n\nLet's paper over this issue by converting the backward slashes to\nforward ones in the test that fails with MSYS2 otherwise.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t9700/test.pl | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t9700/test.pl b/t/t9700/test.pl\nindex 1140767..7e8c40b 100755\n--- a/t/t9700/test.pl\n+++ b/t/t9700/test.pl\n@@ -33,7 +33,7 @@ is($r->config_int(\"test.int\"), 2048, \"config_int: integer\");\n is($r->config_int(\"test.nonexistent\"), undef, \"config_int: nonexistent\");\n ok($r->config_bool(\"test.booltrue\"), \"config_bool: true\");\n ok(!$r->config_bool(\"test.boolfalse\"), \"config_bool: false\");\n-is($r->config_path(\"test.path\"), $r->config(\"test.pathexpanded\"),\n+is($r->config_path(\"test.path\") =~ s/\\\\/\\//gr, $r->config(\"test.pathexpanded\"),\n    \"config_path: ~/foo expansion\");\n is_deeply([$r->config_path(\"test.pathmulti\")], [\"foo\", \"bar\"],\n    \"config_path: multiple values\");\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276659","messageId":"a58158d32cd9c1c2603dfc84458dea7e52d6ac0e.1453650173.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453650173.git.johannes.schindelin@gmx.de","subject":"[PATCH 15/19] mingw: work around pwd issues in the tests","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-24T15:45:18Z","receivedAt":"2016-01-24T15:45:18Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"In Git for Windows' SDK, the tests are run using a Bash that relies on\nthe POSIX emulation layer MSYS2 (itself a friendly fork of Cygwin). As\nsuch, paths in tests can be POSIX paths. As soon as those paths are\npassed to git.exe (which does *not* use the POSIX emulation layer),\nthose paths are converted into Windows paths, though. This happens\nfor command-line parameters, but not when reading, say, config variables.\n\nTo help with that, the `pwd` command is overridden to return the Windows\npath of the current working directory when testing Git on Windows.\n\nHowever, when talking to anything using the POSIX emulation layer, it is\nreally much better to use POSIX paths because Windows paths contain a\ncolon after the drive letter that will easily be mistaken for the common\nseparator in path lists.\n\nSo let's just use the $PWD variable when the POSIX path is needed.\n\nThis lets t7800-difftool.sh, t9400-git-cvsserver-server.sh,\nt9402-git-cvsserver-refs.sh and t9401-git-cvsserver-crlf.sh pass in Git\nfor Windows' SDK.\n\nNote: the cvsserver tests require not only the `cvs` package (install\nit into Git for Windows' SDK via `pacman -S cvs`) but also the Perl\nSQLite bindings (install them into Git for Windows' SDK via\n`cpan DBD::SQLite`).\n\nThis patch is based on earlier work by 마누엘 and Karsten Blees.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t7800-difftool.sh             | 14 +++++++-------\n t/t9400-git-cvsserver-server.sh |  6 +++---\n t/t9401-git-cvsserver-crlf.sh   |  6 +++---\n t/t9402-git-cvsserver-refs.sh   |  6 +++---\n 4 files changed, 16 insertions(+), 16 deletions(-)\n\ndiff --git a/t/t7800-difftool.sh b/t/t7800-difftool.sh\nindex ec8bc8c..4e713f7 100755\n--- a/t/t7800-difftool.sh\n+++ b/t/t7800-difftool.sh\n@@ -430,11 +430,11 @@ EOF\n test_expect_success PERL,SYMLINKS 'difftool --dir-diff --symlink without unstaged changes' '\n \tcat >expect <<-EOF &&\n \tfile\n-\t$(pwd)/file\n+\t$PWD/file\n \tfile2\n-\t$(pwd)/file2\n+\t$PWD/file2\n \tsub/sub\n-\t$(pwd)/sub/sub\n+\t$PWD/sub/sub\n \tEOF\n \tgit difftool --dir-diff --symlink \\\n \t\t--extcmd \"./.git/CHECK_SYMLINKS\" branch HEAD &&\n@@ -448,14 +448,14 @@ EOF\n run_dir_diff_test 'difftool --dir-diff syncs worktree with unstaged change' '\n \ttest_when_finished git reset --hard &&\n \techo \"orig content\" >file &&\n-\tgit difftool -d $symlinks --extcmd \"$(pwd)/modify-right-file\" branch &&\n+\tgit difftool -d $symlinks --extcmd \"$PWD/modify-right-file\" branch &&\n \techo \"new content\" >expect &&\n \ttest_cmp expect file\n '\n \n run_dir_diff_test 'difftool --dir-diff syncs worktree without unstaged change' '\n \ttest_when_finished git reset --hard &&\n-\tgit difftool -d $symlinks --extcmd \"$(pwd)/modify-right-file\" branch &&\n+\tgit difftool -d $symlinks --extcmd \"$PWD/modify-right-file\" branch &&\n \techo \"new content\" >expect &&\n \ttest_cmp expect file\n '\n@@ -466,7 +466,7 @@ EOF\n \n test_expect_success PERL 'difftool --no-symlinks does not overwrite working tree file ' '\n \techo \"orig content\" >file &&\n-\tgit difftool --dir-diff --no-symlinks --extcmd \"$(pwd)/modify-file\" branch &&\n+\tgit difftool --dir-diff --no-symlinks --extcmd \"$PWD/modify-file\" branch &&\n \techo \"new content\" >expect &&\n \ttest_cmp expect file\n '\n@@ -482,7 +482,7 @@ test_expect_success PERL 'difftool --no-symlinks detects conflict ' '\n \t\tTMPDIR=$TRASH_DIRECTORY &&\n \t\texport TMPDIR &&\n \t\techo \"orig content\" >file &&\n-\t\ttest_must_fail git difftool --dir-diff --no-symlinks --extcmd \"$(pwd)/modify-both-files\" branch &&\n+\t\ttest_must_fail git difftool --dir-diff --no-symlinks --extcmd \"$PWD/modify-both-files\" branch &&\n \t\techo \"wt content\" >expect &&\n \t\ttest_cmp expect file &&\n \t\techo \"tmp content\" >expect &&\ndiff --git a/t/t9400-git-cvsserver-server.sh b/t/t9400-git-cvsserver-server.sh\nindex 6146c3f..d708cbf 100755\n--- a/t/t9400-git-cvsserver-server.sh\n+++ b/t/t9400-git-cvsserver-server.sh\n@@ -25,11 +25,11 @@ perl -e 'use DBI; use DBD::SQLite' >/dev/null 2>&1 || {\n     test_done\n }\n \n-WORKDIR=$(pwd)\n-SERVERDIR=$(pwd)/gitcvs.git\n+WORKDIR=$PWD\n+SERVERDIR=$PWD/gitcvs.git\n git_config=\"$SERVERDIR/config\"\n CVSROOT=\":fork:$SERVERDIR\"\n-CVSWORK=\"$(pwd)/cvswork\"\n+CVSWORK=\"$PWD/cvswork\"\n CVS_SERVER=git-cvsserver\n export CVSROOT CVS_SERVER\n \ndiff --git a/t/t9401-git-cvsserver-crlf.sh b/t/t9401-git-cvsserver-crlf.sh\nindex 5a4ed28..f324b9f 100755\n--- a/t/t9401-git-cvsserver-crlf.sh\n+++ b/t/t9401-git-cvsserver-crlf.sh\n@@ -74,11 +74,11 @@ perl -e 'use DBI; use DBD::SQLite' >/dev/null 2>&1 || {\n }\n \n unset GIT_DIR GIT_CONFIG\n-WORKDIR=$(pwd)\n-SERVERDIR=$(pwd)/gitcvs.git\n+WORKDIR=$PWD\n+SERVERDIR=$PWD/gitcvs.git\n git_config=\"$SERVERDIR/config\"\n CVSROOT=\":fork:$SERVERDIR\"\n-CVSWORK=\"$(pwd)/cvswork\"\n+CVSWORK=\"$PWD/cvswork\"\n CVS_SERVER=git-cvsserver\n export CVSROOT CVS_SERVER\n \ndiff --git a/t/t9402-git-cvsserver-refs.sh b/t/t9402-git-cvsserver-refs.sh\nindex d00df08..6d2d3c8 100755\n--- a/t/t9402-git-cvsserver-refs.sh\n+++ b/t/t9402-git-cvsserver-refs.sh\n@@ -82,11 +82,11 @@ perl -e 'use DBI; use DBD::SQLite' >/dev/null 2>&1 || {\n }\n \n unset GIT_DIR GIT_CONFIG\n-WORKDIR=$(pwd)\n-SERVERDIR=$(pwd)/gitcvs.git\n+WORKDIR=$PWD\n+SERVERDIR=$PWD/gitcvs.git\n git_config=\"$SERVERDIR/config\"\n CVSROOT=\":fork:$SERVERDIR\"\n-CVSWORK=\"$(pwd)/cvswork\"\n+CVSWORK=\"$PWD/cvswork\"\n CVS_SERVER=git-cvsserver\n export CVSROOT CVS_SERVER\n \n-- \n2.7.0.windows.1.7.g55a05c8\n\n"},{"id":"276660","messageId":"7c35a7b9c65d9febb6af1b50907988974bca3fbd.1453650173.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453650173.git.johannes.schindelin@gmx.de","subject":"[PATCH 16/19] mingw: avoid absolute path in t0008","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-24T15:45:22Z","receivedAt":"2016-01-24T15:45:22Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Pat Thoyts <patthoyts@users.sourceforge.net>\n\nThe test separator char is a colon which means any absolute paths on\nWindows confuse the tests that use global_excludes.\n\nSuggested-by: Karsten Blees <karsten.blees@gmail.com>\nSigned-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t0008-ignores.sh | 8 +++++++-\n 1 file changed, 7 insertions(+), 1 deletion(-)\n\ndiff --git a/t/t0008-ignores.sh b/t/t0008-ignores.sh\nindex 4ef5ed4..68749f5 100755\n--- a/t/t0008-ignores.sh\n+++ b/t/t0008-ignores.sh\n@@ -5,7 +5,13 @@ test_description=check-ignore\n . ./test-lib.sh\n \n init_vars () {\n-\tglobal_excludes=\"$(pwd)/global-excludes\"\n+\t# On Windows, avoid using \"C:\" in the global-excludes paths.\n+\tif test_have_prereq MINGW\n+\tthen\n+\t\tglobal_excludes=\"global-excludes\"\n+\telse\n+\t\tglobal_excludes=\"$(pwd)/global-excludes\"\n+\tfi\n }\n \n enable_global_excludes () {\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276661","messageId":"9045a31ec16da672a74d9b1e0b65807d21ef277e.1453650173.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453650173.git.johannes.schindelin@gmx.de","subject":"[PATCH 17/19] mingw: fix git-svn tests that expect chmod to work","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-24T15:45:47Z","receivedAt":"2016-01-24T15:45:47Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: 마누엘 <nalla@users.noreply.github.com>\n\nSome git-svn tests expect that the executable bit of files can be\ntoggled. On Windows, this is not possible because Windows' Access\nControl Lists are much more fine-grained than the POSIX permission\nconcept. Let's just not try to flip the executable bit.\n\nThis lets t9118-git-svn-funky-branch-names.sh and\nt9124-git-svn-dcommit-auto-props.sh pass in Git for Windows' SDK,\nand partially fixes t9100-git-svn-basic.sh.\n\nSigned-off-by: 마누엘 <nalla@users.noreply.github.com>\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t9100-git-svn-basic.sh              |  5 ++++-\n t/t9118-git-svn-funky-branch-names.sh | 12 +++++++++---\n t/t9124-git-svn-dcommit-auto-props.sh | 20 ++++++++++++++++----\n 3 files changed, 29 insertions(+), 8 deletions(-)\n\ndiff --git a/t/t9100-git-svn-basic.sh b/t/t9100-git-svn-basic.sh\nindex dbb440b..bca7ec8 100755\n--- a/t/t9100-git-svn-basic.sh\n+++ b/t/t9100-git-svn-basic.sh\n@@ -38,7 +38,10 @@ test_expect_success \\\n \t\tmkdir bar &&\n \t\techo \"zzz\" >bar/zzz &&\n \t\techo \"#!/bin/sh\" >exec.sh &&\n-\t\tchmod +x exec.sh &&\n+\t\t{\n+\t\t\ttest_have_prereq !POSIXPERM ||\n+\t\t\tchmod +x exec.sh\n+\t\t} &&\n \t\tsvn_cmd import -m \"import for git svn\" . \"$svnrepo\" >/dev/null\n \t) &&\n \trm -rf import &&\ndiff --git a/t/t9118-git-svn-funky-branch-names.sh b/t/t9118-git-svn-funky-branch-names.sh\nindex a221915..49775a5 100755\n--- a/t/t9118-git-svn-funky-branch-names.sh\n+++ b/t/t9118-git-svn-funky-branch-names.sh\n@@ -23,8 +23,11 @@ test_expect_success 'setup svnrepo' '\n \t              \"$svnrepo/pr ject/branches/$scary_uri\" &&\n \tsvn_cmd cp -m \"leading dot\" \"$svnrepo/pr ject/trunk\" \\\n \t\t\t\"$svnrepo/pr ject/branches/.leading_dot\" &&\n-\tsvn_cmd cp -m \"trailing dot\" \"$svnrepo/pr ject/trunk\" \\\n-\t\t\t\"$svnrepo/pr ject/branches/trailing_dot.\" &&\n+\t{\n+\t\ttest_have_prereq MINGW ||\n+\t\tsvn_cmd cp -m \"trailing dot\" \"$svnrepo/pr ject/trunk\" \\\n+\t\t\t\"$svnrepo/pr ject/branches/trailing_dot.\"\n+\t} &&\n \tsvn_cmd cp -m \"trailing .lock\" \"$svnrepo/pr ject/trunk\" \\\n \t\t\t\"$svnrepo/pr ject/branches/trailing_dotlock.lock\" &&\n \tsvn_cmd cp -m \"reflog\" \"$svnrepo/pr ject/trunk\" \\\n@@ -45,7 +48,10 @@ test_expect_success 'test clone with funky branch names' '\n \t\tgit rev-parse \"refs/remotes/origin/more%20fun%20plugin!\" &&\n \t\tgit rev-parse \"refs/remotes/origin/$scary_ref\" &&\n \t\tgit rev-parse \"refs/remotes/origin/%2Eleading_dot\" &&\n-\t\tgit rev-parse \"refs/remotes/origin/trailing_dot%2E\" &&\n+\t\t{\n+\t\t\ttest_have_prereq MINGW ||\n+\t\t\tgit rev-parse \"refs/remotes/origin/trailing_dot%2E\"\n+\t\t} &&\n \t\tgit rev-parse \"refs/remotes/origin/trailing_dotlock%2Elock\" &&\n \t\tgit rev-parse \"refs/remotes/origin/$non_reflog\"\n \t)\ndiff --git a/t/t9124-git-svn-dcommit-auto-props.sh b/t/t9124-git-svn-dcommit-auto-props.sh\nindex aa841e1..c851121 100755\n--- a/t/t9124-git-svn-dcommit-auto-props.sh\n+++ b/t/t9124-git-svn-dcommit-auto-props.sh\n@@ -35,7 +35,10 @@ test_expect_success 'enable auto-props config' '\n \n test_expect_success 'add files matching auto-props' '\n \techo \"#!$SHELL_PATH\" >exec1.sh &&\n-\tchmod +x exec1.sh &&\n+\t{\n+\t\ttest_have_prereq !POSIXPERM ||\n+\t\tchmod +x exec1.sh\n+\t} &&\n \techo \"hello\" >hello.txt &&\n \techo bar >bar &&\n \tgit add exec1.sh hello.txt bar &&\n@@ -49,7 +52,10 @@ test_expect_success 'disable auto-props config' '\n \n test_expect_success 'add files matching disabled auto-props' '\n \techo \"#$SHELL_PATH\" >exec2.sh &&\n-\tchmod +x exec2.sh &&\n+\t{\n+\t\ttest_have_prereq !POSIXPERM ||\n+\t\tchmod +x exec2.sh\n+\t} &&\n \techo \"world\" >world.txt &&\n \techo zot >zot &&\n \tgit add exec2.sh world.txt zot &&\n@@ -65,7 +71,10 @@ test_expect_success 'check resulting svn repository' '\n \tcd svnrepo &&\n \n \t# Check properties from first commit.\n-\ttest \"x$(svn_cmd propget svn:executable exec1.sh)\" = \"x*\" &&\n+\t{\n+\t\ttest_have_prereq !POSIXPERM ||\n+\t\ttest \"x$(svn_cmd propget svn:executable exec1.sh)\" = \"x*\"\n+\t} &&\n \ttest \"x$(svn_cmd propget svn:mime-type exec1.sh)\" = \\\n \t     \"xapplication/x-shellscript\" &&\n \ttest \"x$(svn_cmd propget svn:mime-type hello.txt)\" = \"xtext/plain\" &&\n@@ -73,7 +82,10 @@ test_expect_success 'check resulting svn repository' '\n \ttest \"x$(svn_cmd propget svn:mime-type bar)\" = \"x\" &&\n \n \t# Check properties from second commit.\n-\ttest \"x$(svn_cmd propget svn:executable exec2.sh)\" = \"x*\" &&\n+\t{\n+\t\ttest_have_prereq !POSIXPERM ||\n+\t\ttest \"x$(svn_cmd propget svn:executable exec2.sh)\" = \"x*\"\n+\t} &&\n \ttest \"x$(svn_cmd propget svn:mime-type exec2.sh)\" = \"x\" &&\n \ttest \"x$(svn_cmd propget svn:mime-type world.txt)\" = \"x\" &&\n \ttest \"x$(svn_cmd propget svn:eol-style world.txt)\" = \"x\" &&\n-- \n2.7.0.windows.1.7.g55a05c8\n\n"},{"id":"276662","messageId":"ff13c4125f268905baaa10a097ffdafe07eafb25.1453650173.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453650173.git.johannes.schindelin@gmx.de","subject":"[PATCH 18/19] mingw: skip a couple of git-svn tests that cannot pass on Windows","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-24T15:45:52Z","receivedAt":"2016-01-24T15:45:52Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Some of the tests expect that executable bits can be toggled, others\nexpect that paths are POSIX paths (but when they come through git.exe,\nthey are converted into Windows paths and necessarily differ), yet\nothers expect symbolic links to be available.\n\nThis lets t9100-git-svn-basic.sh and t9130-git-svn-authors-file.sh pass\nin Git for Windows' SDK.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t9100-git-svn-basic.sh        | 15 +++++++--------\n t/t9130-git-svn-authors-file.sh |  2 +-\n 2 files changed, 8 insertions(+), 9 deletions(-)\n\ndiff --git a/t/t9100-git-svn-basic.sh b/t/t9100-git-svn-basic.sh\nindex bca7ec8..8c74ffa 100755\n--- a/t/t9100-git-svn-basic.sh\n+++ b/t/t9100-git-svn-basic.sh\n@@ -127,7 +127,7 @@ test_expect_success \"$name\" '\n \n \n name='remove executable bit from a file'\n-test_expect_success \"$name\" '\n+test_expect_success !MINGW \"$name\" '\n \trm -f \"$GIT_DIR\"/index &&\n \tgit checkout -f -b mybranch5 ${remotes_git_svn} &&\n \tchmod -x exec.sh &&\n@@ -140,7 +140,7 @@ test_expect_success \"$name\" '\n \n \n name='add executable bit back file'\n-test_expect_success \"$name\" '\n+test_expect_success !MINGW \"$name\" '\n \tchmod +x exec.sh &&\n \tgit update-index exec.sh &&\n \tgit commit -m \"$name\" &&\n@@ -151,7 +151,7 @@ test_expect_success \"$name\" '\n \n \n name='executable file becomes a symlink to file'\n-test_expect_success \"$name\" '\n+test_expect_success !MINGW \"$name\" '\n \trm exec.sh &&\n \tln -s file exec.sh &&\n \tgit update-index exec.sh &&\n@@ -163,8 +163,7 @@ test_expect_success \"$name\" '\n \n name='new symlink is added to a file that was also just made executable'\n \n-test_expect_success \"$name\" '\n-\tchmod +x file &&\n+test_expect_success !MINGW \"$name\" '\n \tln -s file exec-2.sh &&\n \tgit update-index --add file exec-2.sh &&\n \tgit commit -m \"$name\" &&\n@@ -175,7 +174,7 @@ test_expect_success \"$name\" '\n \ttest -h \"$SVN_TREE\"/exec-2.sh'\n \n name='modify a symlink to become a file'\n-test_expect_success \"$name\" '\n+test_expect_success !MINGW \"$name\" '\n \techo git help >help &&\n \trm exec-2.sh &&\n \tcp help exec-2.sh &&\n@@ -191,7 +190,7 @@ test_expect_success \"$name\" '\n name=\"commit with UTF-8 message: locale: $GIT_SVN_LC_ALL\"\n LC_ALL=\"$GIT_SVN_LC_ALL\"\n export LC_ALL\n-test_expect_success UTF8 \"$name\" \"\n+test_expect_success !MINGW,UTF8 \"$name\" \"\n \techo '# hello' >> exec-2.sh &&\n \tgit update-index exec-2.sh &&\n \tgit commit -m '???????' &&\n@@ -224,7 +223,7 @@ tree d667270a1f7b109f5eb3aaea21ede14b56bfdd6e\n tree 8f51f74cf0163afc9ad68a4b1537288c4558b5a4\n EOF\n \n-test_expect_success \"$name\" \"test_cmp a expected\"\n+test_expect_success !MINGW \"$name\" \"test_cmp a expected\"\n \n test_expect_success 'exit if remote refs are ambigious' \"\n         git config --add svn-remote.svn.fetch \\\ndiff --git a/t/t9130-git-svn-authors-file.sh b/t/t9130-git-svn-authors-file.sh\nindex d306b77..4126481 100755\n--- a/t/t9130-git-svn-authors-file.sh\n+++ b/t/t9130-git-svn-authors-file.sh\n@@ -91,7 +91,7 @@ test_expect_success 'fetch continues after authors-file is fixed' '\n \t)\n \t'\n \n-test_expect_success 'fresh clone with svn.authors-file in config' '\n+test_expect_success !MINGW 'fresh clone with svn.authors-file in config' '\n \t(\n \t\trm -r \"$GIT_DIR\" &&\n \t\ttest x = x\"$(git config svn.authorsfile)\" &&\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276663","messageId":"9f41daa9890b458e485407fb0a3ffa59e0c1ead6.1453650173.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453650173.git.johannes.schindelin@gmx.de","subject":"[PATCH 19/19] mingw: do not bother to test funny file names","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-24T15:45:56Z","receivedAt":"2016-01-24T15:45:56Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"MSYS2 actually allows to create files or directories whose names contain\ntabs, newlines or colors, even if plain Win32 API cannot access them.\nAs we are using an MSYS2 bash to run the tests, such files or\ndirectories are created successfully, but Git itself has no chance to\nwork with them because it is a regular Windows program, hence limited by\nthe Win32 API.\n\nWith this change, on Windows otherwise failing tests in\nt3300-funny-names.sh, t3600-rm.sh, t3703-add-magic-pathspec.sh,\nt3902-quoted.sh, t4016-diff-quote.sh, t4135-apply-weird-filenames.sh,\nt9200-git-cvsexportcommit.sh, and t9903-bash-prompt.sh are skipped.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t3300-funny-names.sh           | 1 +\n t/t3600-rm.sh                    | 3 ++-\n t/t3703-add-magic-pathspec.sh    | 2 +-\n t/t3902-quoted.sh                | 1 +\n t/t4016-diff-quote.sh            | 1 +\n t/t4135-apply-weird-filenames.sh | 3 ++-\n t/t9200-git-cvsexportcommit.sh   | 2 +-\n t/t9903-bash-prompt.sh           | 2 +-\n 8 files changed, 10 insertions(+), 5 deletions(-)\n\ndiff --git a/t/t3300-funny-names.sh b/t/t3300-funny-names.sh\nindex 9a146f1..04de03c 100755\n--- a/t/t3300-funny-names.sh\n+++ b/t/t3300-funny-names.sh\n@@ -13,6 +13,7 @@ tree, index, and tree objects.\n \n HT='\t'\n \n+test_have_prereq MINGW ||\n echo 2>/dev/null > \"Name with an${HT}HT\"\n if ! test -f \"Name with an${HT}HT\"\n then\ndiff --git a/t/t3600-rm.sh b/t/t3600-rm.sh\nindex 2e47a2b..5232ee9 100755\n--- a/t/t3600-rm.sh\n+++ b/t/t3600-rm.sh\n@@ -14,7 +14,8 @@ test_expect_success \\\n      git add -- foo bar baz 'space embedded' -q &&\n      git commit -m 'add normal files'\"\n \n-if touch -- 'tab\tembedded' 'newline\n+\n+if ! test_have_prereq MINGW && touch -- 'tab\tembedded' 'newline\n embedded' 2>/dev/null\n then\n \ttest_set_prereq FUNNYNAMES\ndiff --git a/t/t3703-add-magic-pathspec.sh b/t/t3703-add-magic-pathspec.sh\nindex 5115de7..aaff784 100755\n--- a/t/t3703-add-magic-pathspec.sh\n+++ b/t/t3703-add-magic-pathspec.sh\n@@ -38,7 +38,7 @@ cat >expected <<EOF\n add 'sub/foo'\n EOF\n \n-if mkdir \":\" 2>/dev/null\n+if ! test_have_prereq MINGW && mkdir \":\" 2>/dev/null\n then\n \ttest_set_prereq COLON_DIR\n fi\ndiff --git a/t/t3902-quoted.sh b/t/t3902-quoted.sh\nindex 892f567..f528008 100755\n--- a/t/t3902-quoted.sh\n+++ b/t/t3902-quoted.sh\n@@ -12,6 +12,7 @@ GN='???'\n HT='\t'\n DQ='\"'\n \n+test_have_prereq MINGW ||\n echo foo 2>/dev/null > \"Name and an${HT}HT\"\n if ! test -f \"Name and an${HT}HT\"\n then\ndiff --git a/t/t4016-diff-quote.sh b/t/t4016-diff-quote.sh\nindex cd543ec..9c48e5c 100755\n--- a/t/t4016-diff-quote.sh\n+++ b/t/t4016-diff-quote.sh\n@@ -13,6 +13,7 @@ P1='pathname\twith HT'\n P2='pathname with SP'\n P3='pathname\n with LF'\n+test_have_prereq !MINGW &&\n echo 2>/dev/null >\"$P1\" && test -f \"$P1\" && rm -f \"$P1\" || {\n \tskip_all='Your filesystem does not allow tabs in filenames'\n \ttest_done\ndiff --git a/t/t4135-apply-weird-filenames.sh b/t/t4135-apply-weird-filenames.sh\nindex bf5dc57..6d6b96d 100755\n--- a/t/t4135-apply-weird-filenames.sh\n+++ b/t/t4135-apply-weird-filenames.sh\n@@ -19,7 +19,8 @@ test_expect_success 'setup' '\n \n \ttest_when_finished \"rm -f \\\"tab\tembedded.txt\\\"\" &&\n \ttest_when_finished \"rm -f '\\''\\\"quoteembedded\\\".txt'\\''\" &&\n-\tif touch -- \"tab\tembedded.txt\" '\\''\"quoteembedded\".txt'\\''\n+\tif ! test_have_prereq MINGW &&\n+\t\ttouch -- \"tab\tembedded.txt\" '\\''\"quoteembedded\".txt'\\''\n \tthen\n \t\ttest_set_prereq FUNNYNAMES\n \tfi\ndiff --git a/t/t9200-git-cvsexportcommit.sh b/t/t9200-git-cvsexportcommit.sh\nindex 812c9cd..5cfb9cf 100755\n--- a/t/t9200-git-cvsexportcommit.sh\n+++ b/t/t9200-git-cvsexportcommit.sh\n@@ -197,7 +197,7 @@ if p=\"??/goo/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/??/??/??\" &&\n then\n \n # This test contains UTF-8 characters\n-test_expect_success \\\n+test_expect_success !MINGW \\\n      'File with non-ascii file name' \\\n      'mkdir -p ??/goo/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/??/??/?? &&\n       echo Foo >??/goo/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/??/??/??/g??rdets??g??rdet.txt &&\ndiff --git a/t/t9903-bash-prompt.sh b/t/t9903-bash-prompt.sh\nindex af82049..2ee6564 100755\n--- a/t/t9903-bash-prompt.sh\n+++ b/t/t9903-bash-prompt.sh\n@@ -67,7 +67,7 @@ repo_with_newline='repo\n with\n newline'\n \n-if mkdir \"$repo_with_newline\" 2>/dev/null\n+if ! test_have_prereq MINGW && mkdir \"$repo_with_newline\" 2>/dev/null\n then\n \ttest_set_prereq FUNNYNAMES\n else\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276667","messageId":"4C2ED807DD184A168C87221809034B70@PhilipOakley","threadId":"41254","inReplyTo":"d75b0dc0b76beefee9e705555ca4f2fa4f4b96ce.1453650173.git.johannes.schindelin@gmx.de","subject":"Re: [PATCH 06/19] mingw: try to delete target directory before renaming","fromName":"Philip Oakley","fromEmail":"philipoakley@iee.org","sentAt":null,"receivedAt":"2016-01-24T16:36:48Z","isPatch":true,"sender":{"key":"philipoakley@iee.email","avatar":"https://avatars.githubusercontent.com/u/914343?v=4"},"body":"From: \"Johannes Schindelin\" <johannes.schindelin@gmx.de>\n>From: 마누엘 <nalla@users.noreply.github.com>\n\nIs this Nalla's preferred email, or just a carry over from cautions of the \nGithub interface?\n\n>\n>When the rename() function tries to move a directory it fails if the\n>target directory exists. It should check if it can delete the (possibly\n>empty) target directory and then try again to move the directory.\n>\n>This partially fixes t9100-git-svn-basic.sh.\n>\n>Signed-off-by: 마누엘 <nalla@users.noreply.github.com>\n>Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n>---\n>compat/mingw.c | 7 ++++++-\n>1 file changed, 6 insertions(+), 1 deletion(-)\n>\n>diff --git a/compat/mingw.c b/compat/mingw.c\n>index db92f5d..e4839b9 100644\n>--- a/compat/mingw.c\n>+++ b/compat/mingw.c\n>@@ -1603,7 +1603,12 @@ repeat:\n>  if (gle == ERROR_ACCESS_DENIED &&\n>      (attrs = GetFileAttributesW(wpnew)) != INVALID_FILE_ATTRIBUTES) {\n>  if (attrs & FILE_ATTRIBUTE_DIRECTORY) {\n>- errno = EISDIR;\n>+ DWORD attrsold = GetFileAttributesW(wpold);\n>+ if (attrsold == INVALID_FILE_ATTRIBUTES ||\n>+     !(attrsold & FILE_ATTRIBUTE_DIRECTORY))\n>+ errno = EISDIR;\n>+ else if (!_wrmdir(wpnew))\n>+ goto repeat;\n>  return -1;\n>  }\n>  if ((attrs & FILE_ATTRIBUTE_READONLY) &&\n>-- \n>2.7.0.windows.1.7.g55a05c8\n--\nPhilip\n"},{"id":"276671","messageId":"56A52B28.8010304@kdbg.org","threadId":"41254","inReplyTo":"12c030323940de4a0845eda9bdd7b67c4e90864a.1453650173.git.johannes.schindelin@gmx.de","subject":"Re: [PATCH 09/19] mingw: accomodate t0060-path-utils for MSYS2","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2016-01-24T19:51:04Z","receivedAt":"2016-01-24T19:51:04Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 24.01.2016 um 16:44 schrieb Johannes Schindelin:\n> On Windows, there are no POSIX paths, only Windows ones (an absolute\n> Windows path looks like \"C:\\Program Files\\Git\\ReleaseNotes.html\", under\n> most circumstances, forward slashes are also allowed and synonymous to\n> backslashes).\n> \n> So when a POSIX shell (such as MSYS2's Bash, which is used by Git for\n> Windows to execute all those shell scripts that are part of Git) passes\n> a POSIX path to test-path-utils.exe (which is not POSIX-aware), the path\n> is translated into a Windows path. For example, /etc/profile becomes\n> C:/Program Files/Git/etc/profile.\n> \n> This path translation poses a problem when passing the root directory as\n> parameter to test-path-utils.exe, as it is not well defined whether the\n> translated root directory should end in a slash or not. MSys1 stripped\n> the trailing slash, but MSYS2 does not.\n> \n> To work with both behaviors, we simply test what the current system does\n> in the beginning of t0060-path-utils.sh and then adjust the expected\n> longest ancestor length accordingly.\n> \n> Originally, the Git for Windows project patched MSYS2's runtime to\n> accomodate Git's regression test, but we really should do it the other\n> way round.\n> \n> Thanks to Ray Donnelly for his patient help with this issue.\n> \n> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> ---\n>   t/t0060-path-utils.sh | 37 ++++++++++++++++++++++---------------\n>   1 file changed, 22 insertions(+), 15 deletions(-)\n> \n> diff --git a/t/t0060-path-utils.sh b/t/t0060-path-utils.sh\n> index f0152a7..89d03e7 100755\n> --- a/t/t0060-path-utils.sh\n> +++ b/t/t0060-path-utils.sh\n> @@ -7,6 +7,13 @@ test_description='Test various path utilities'\n>   \n>   . ./test-lib.sh\n>   \n> +# On Windows, the root directory \"/\" is translated into a Windows directory.\n> +# As it is not well-defined whether that Windows directory should end in a\n> +# slash or not, let's test for that and adjust our expected longest ancestor\n> +# length accordingly.\n> +root_offset=0\n> +case \"$(test-path-utils print_path /)\" in ?*/) root_offset=-1;; esac\n> +\n>   norm_path() {\n>   \texpected=$(test-path-utils print_path \"$2\")\n>   \ttest_expect_success $3 \"normalize path: $1 => $2\" \\\n\nIn t0060-path-utils.sh, I currently find this:\n\n# On Windows, we are using MSYS's bash, which mangles the paths.\n# Absolute paths are anchored at the MSYS installation directory,\n# which means that the path / accounts for this many characters:\nrootoff=$(test-path-utils normalize_path_copy / | wc -c)\n# Account for the trailing LF:\nif test $rootoff = 2; then\n\trootoff=\t# we are on Unix\nelse\n\trootoff=$(($rootoff-1))\nfi\n\nancestor() {\n\t# We do some math with the expected ancestor length.\n\texpected=$3\n\tif test -n \"$rootoff\" && test \"x$expected\" != x-1; then\n\t\texpected=$(($expected+$rootoff))\n\tfi\n\ttest_expect_success \"longest ancestor: $1 $2 => $expected\" \\\n\t\"actual=\\$(test-path-utils longest_ancestor_length '$1' '$2') &&\n\t test \\\"\\$actual\\\" = '$expected'\"\n}\n\nFurthermore, since you are modifying only cases where the expected\nvalue is not -1 and we already have a check for this case in the\nhelper function, wouldn't it be simpler to merge the offset that your\ncase needs with the one that we already have?\n\n> @@ -112,30 +119,30 @@ norm_path /d1/.../d2 /d1/.../d2\n>   norm_path /d1/..././../d2 /d1/d2\n>   \n>   ancestor / / -1\n> -ancestor /foo / 0\n> +ancestor /foo / $root_offset\n>   ancestor /foo /fo -1\n>   ancestor /foo /foo -1\n>   ancestor /foo /bar -1\n>   ancestor /foo /foo/bar -1\n>   ancestor /foo /foo:/bar -1\n> -ancestor /foo /:/foo:/bar 0\n> -ancestor /foo /foo:/:/bar 0\n> -ancestor /foo /:/bar:/foo 0\n> -ancestor /foo/bar / 0\n> +ancestor /foo /:/foo:/bar $root_offset\n> +ancestor /foo /foo:/:/bar $root_offset\n> +ancestor /foo /:/bar:/foo $root_offset\n> +ancestor /foo/bar / $root_offset\n>   ancestor /foo/bar /fo -1\n> -ancestor /foo/bar /foo 4\n> +ancestor /foo/bar /foo $((4+$root_offset))\n>   ancestor /foo/bar /foo/ba -1\n> -ancestor /foo/bar /:/fo 0\n> -ancestor /foo/bar /foo:/foo/ba 4\n> +ancestor /foo/bar /:/fo $root_offset\n> +ancestor /foo/bar /foo:/foo/ba $((4+$root_offset))\n>   ancestor /foo/bar /bar -1\n>   ancestor /foo/bar /fo -1\n> -ancestor /foo/bar /foo:/bar 4\n> -ancestor /foo/bar /:/foo:/bar 4\n> -ancestor /foo/bar /foo:/:/bar 4\n> -ancestor /foo/bar /:/bar:/fo 0\n> -ancestor /foo/bar /:/bar 0\n> -ancestor /foo/bar /foo 4\n> -ancestor /foo/bar /foo:/bar 4\n> +ancestor /foo/bar /foo:/bar $((4+$root_offset))\n> +ancestor /foo/bar /:/foo:/bar $((4+$root_offset))\n> +ancestor /foo/bar /foo:/:/bar $((4+$root_offset))\n> +ancestor /foo/bar /:/bar:/fo $root_offset\n> +ancestor /foo/bar /:/bar $root_offset\n> +ancestor /foo/bar /foo $((4+$root_offset))\n> +ancestor /foo/bar /foo:/bar $((4+$root_offset))\n>   ancestor /foo/bar /bar -1\n>   \n>   test_expect_success 'strip_path_suffix' '\n> \n"},{"id":"276686","messageId":"xmqqmvrubfxr.fsf@gitster.mtv.corp.google.com","threadId":"41254","inReplyTo":"cover.1453650173.git.johannes.schindelin@gmx.de","subject":"Re: [PATCH 00/19] Let Git's tests pass on Windows","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-01-25T01:34:08Z","receivedAt":"2016-01-25T01:34:08Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <johannes.schindelin@gmx.de> writes:\n\n> This is a big milestone. With these modifications, Git's source code\n> does not only build without warnings in Git for Windows' SDK, but\n> passes the entire regression test suite.\n\n;-)\n\nIt is somewhat surprising that with only these changes my tree is no\nlonger behind the Git for Windows effort--all tests pass so everything\nshould be working perfectly, right ;-)\n\nThere were a few changes in the series that raised my eyebrows,\nwhich I'll respond separately, but overall it's a great\nachievement.\n\nThanks.\n\n>\n> The patch series contains three different types of patches. First,\n> there are a couple of real fixes that were triggered by failures in\n> the regression tests. Then there are a couple of fixes to the\n> regression tests themselves. And finally, we have to disable a couple\n> of tests because we simply cannot make them work on Windows.\n>\n>\n> Johannes Schindelin (13):\n>   mingw: let's use gettext with MSYS2\n>   mingw: do not trust MSYS2's MinGW gettext.sh\n>   Git.pm: stop assuming that absolute paths start with a slash\n>   mingw: prepare the TMPDIR environment variable for shell scripts\n>   mingw: let lstat() fail with errno == ENOTDIR when appropriate\n>   mingw: fix t5601-clone.sh\n>   mingw: accomodate t0060-path-utils for MSYS2\n>   mingw: disable mkfifo-based tests\n>   tests: turn off git-daemon tests if FIFOs are not available\n>   mingw: fix t9700's assumption about directory separators\n>   mingw: work around pwd issues in the tests\n>   mingw: skip a couple of git-svn tests that cannot pass on Windows\n>   mingw: do not bother to test funny file names\n>\n> Karsten Blees (2):\n>   mingw: factor out Windows specific environment setup\n>   mingw: do not use symlinks with SVN in t9100\n>\n> Pat Thoyts (1):\n>   mingw: avoid absolute path in t0008\n>\n> Thomas Braun (1):\n>   mingw: outsmart MSYS2's path substitution in t1508\n>\n> 마누엘 (2):\n>   mingw: try to delete target directory before renaming\n>   mingw: fix git-svn tests that expect chmod to work\n>\n>  Makefile                              |  1 +\n>  compat/mingw.c                        | 91 +++++++++++++++++++++++++++++------\n>  config.mak.uname                      |  3 +-\n>  perl/Git.pm                           |  3 +-\n>  t/lib-git-daemon.sh                   |  5 ++\n>  t/t0008-ignores.sh                    |  8 ++-\n>  t/t0060-path-utils.sh                 | 37 ++++++++------\n>  t/t1508-at-combinations.sh            | 13 ++++-\n>  t/t3300-funny-names.sh                |  1 +\n>  t/t3600-rm.sh                         |  3 +-\n>  t/t3703-add-magic-pathspec.sh         |  2 +-\n>  t/t3902-quoted.sh                     |  1 +\n>  t/t4016-diff-quote.sh                 |  1 +\n>  t/t4135-apply-weird-filenames.sh      |  3 +-\n>  t/t5601-clone.sh                      | 18 +++----\n>  t/t7800-difftool.sh                   | 14 +++---\n>  t/t9100-git-svn-basic.sh              | 29 +++++++----\n>  t/t9118-git-svn-funky-branch-names.sh | 12 +++--\n>  t/t9124-git-svn-dcommit-auto-props.sh | 20 ++++++--\n>  t/t9130-git-svn-authors-file.sh       |  2 +-\n>  t/t9200-git-cvsexportcommit.sh        |  2 +-\n>  t/t9400-git-cvsserver-server.sh       |  6 +--\n>  t/t9401-git-cvsserver-crlf.sh         |  6 +--\n>  t/t9402-git-cvsserver-refs.sh         |  6 +--\n>  t/t9700/test.pl                       |  2 +-\n>  t/t9903-bash-prompt.sh                |  2 +-\n>  t/test-lib.sh                         |  2 +-\n>  test-fake-ssh.c                       | 30 ++++++++++++\n>  28 files changed, 238 insertions(+), 85 deletions(-)\n>  create mode 100644 test-fake-ssh.c\n"},{"id":"276687","messageId":"xmqqio2ibfkn.fsf@gitster.mtv.corp.google.com","threadId":"41254","inReplyTo":"7162dcb55e6a317cba840ef1176d09d99fc37f6b.1453650173.git.johannes.schindelin@gmx.de","subject":"Re: [PATCH 01/19] mingw: let's use gettext with MSYS2","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-01-25T01:42:00Z","receivedAt":"2016-01-25T01:42:00Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <johannes.schindelin@gmx.de> writes:\n\n> This solves two problems:\n>\n> - we now have proper localisation even on Windows\n>\n> - we sidestep the infamous \"BUG: your vsnprintf is broken (returned -1)\"\n>   message when running \"git init\" (which otherwise prevents the entire\n>   test suite from running)\n\nIt is unclear to me how gettext is related to use of vsnprintf().\n\"sidestep\" hints me that perhaps we do not call vsnprintf() from\nstrbuf_vaddf() in a way that reveals its breakage when we are using\ngettext, but I am not quite seeing how.\n\nBecause as the next sentence says, that does sound like a critical\nissue not to be able to even run \"init\", I wanted to learn more\nabout the real issue.\n\n>\n> The latter issue is rather crucial, as *no* test passes in Git for\n> Windows without this fix.\n>\n> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> ---\n>  config.mak.uname | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/config.mak.uname b/config.mak.uname\n> index 4b2e1b8..6b25661 100644\n> --- a/config.mak.uname\n> +++ b/config.mak.uname\n> @@ -560,7 +560,7 @@ else\n>  \t\tNO_R_TO_GCC_LINKER = YesPlease\n>  \t\tINTERNAL_QSORT = YesPlease\n>  \t\tHAVE_LIBCHARSET_H = YesPlease\n> -\t\tNO_GETTEXT = YesPlease\n> +\t\tNO_GETTEXT =\n>  \t\tUSE_LIBPCRE= YesPlease\n>  \t\tNO_CURL =\n>  \t\tUSE_NED_ALLOCATOR = YesPlease\n"},{"id":"276688","messageId":"xmqqegd6bf4j.fsf@gitster.mtv.corp.google.com","threadId":"41254","inReplyTo":"f016fde3118f5028b7e589f36bc9c916464a9de9.1453650173.git.johannes.schindelin@gmx.de","subject":"Re: [PATCH 12/19] mingw: do not use symlinks with SVN in t9100","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-01-25T01:51:40Z","receivedAt":"2016-01-25T01:51:40Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <johannes.schindelin@gmx.de> writes:\n\n> From: Karsten Blees <blees@dcon.de>\n>\n> The SVN library does not seem to support symlinks, even if symlinks are\n> enabled in MSYS2 and Git. Use 'cp' instead of 'ln -s'.\n>\n> This partially fixes t/t9100-git-svn-basic.sh\n>\n> Signed-off-by: Karsten Blees <blees@dcon.de>\n> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> ---\n>  t/t9100-git-svn-basic.sh | 9 ++++++++-\n>  1 file changed, 8 insertions(+), 1 deletion(-)\n\nFor the purpose of SVN test, is it important that foo.link is a link\nto foo?  I am wondering what would be the fallout from making this\nchange without \"only on MINGW do this\".\n\nOn the other hand, perhaps such a change may make this particular\ntest meaningless for whatever reason.  Perhaps this test is about\ngit-svn handling a symbolic link correctly, and you wouldn't be\ntesting anything useful if you unconditionally changed \"ln -s\" to\n\"cp\" on all platforms.  But if that is the case, I suspect that it\nwould make more sense to mark the test to be skipped using the\nprerequiste, instead of pretending that this test passes.  While the\nupdated test may be testing that the same \"works correctly on\nsymbolic links\" as before on all the other platforms, on MINGW, it\nis testing something completely different.\n\nI cannot quite tell if that is the case.\n\n> diff --git a/t/t9100-git-svn-basic.sh b/t/t9100-git-svn-basic.sh\n> index 258d9b8..dbb440b 100755\n> --- a/t/t9100-git-svn-basic.sh\n> +++ b/t/t9100-git-svn-basic.sh\n> @@ -25,7 +25,14 @@ test_expect_success \\\n>  \t(\n>  \t\tcd import &&\n>  \t\techo foo >foo &&\n> -\t\tln -s foo foo.link\n> +\t\tif test_have_prereq !MINGW\n> +\t\tthen\n> +\t\t\tln -s foo foo.link\n> +\t\telse\n> +\t\t\t# MSYS libsvn does not support symlinks, so always use cp, even if\n> +\t\t\t# ln -s actually works\n> +\t\t\tcp foo foo.link\n> +\t\tfi\n>  \t\tmkdir -p dir/a/b/c/d/e &&\n>  \t\techo \"deep dir\" >dir/a/b/c/d/e/file &&\n>  \t\tmkdir bar &&\n"},{"id":"276689","messageId":"xmqqa8nubekj.fsf@gitster.mtv.corp.google.com","threadId":"41254","inReplyTo":"1a4477f951edc9f58a24163d3935a7b35a3f14b2.1453650173.git.johannes.schindelin@gmx.de","subject":"Re: [PATCH 13/19] mingw: outsmart MSYS2's path substitution in t1508","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-01-25T02:03:40Z","receivedAt":"2016-01-25T02:03:40Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <johannes.schindelin@gmx.de> writes:\n\n> From: Thomas Braun <thomas.braun@byte-physics.de>\n>\n> A string of the form \"@/abcd\" is considered a file path\n> by the msys layer and therefore translated to a Windows path.\n>\n> Here the trick is to double the slashes.\n>\n> The MSYS2 patch translation can be studied by calling\n>\n> \ttest-path-utils print_path <path>\n>\n> Signed-off-by: Thomas Braun <thomas.braun@byte-physics.de>\n> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> ---\n\nThis feels wrong.\n\nThe point of this test is that you can ask to checkout a branch\nwhose name is a strangely looking \"@/at-test\", and a ref whose name\nis \"refs/heads/@/at-test\" indeed is created.\n\nThe current \"checkout\" may be lazy and not signal an error for a\nbranch name with two consecutive slashes, but I wouldn't be\nsurprised if we tighten that later, and more importantly, I do not\nthink we ever promised users if you asked a branch \"a//b\" to be\ncreated, we would create \"refs/heads/a/b\".\n\nThe new test hardcodes and promises such an incompatible behaviour,\ni.e. a request to create \"@//b\" results in \"@/b\" created, only to\nusers on MINGW, fracturing the expectations of the Git userbase.\n\nWouldn't it be better to declare \"On other people's Git, @/foo is\njust as normal a branch name as a/foo, but on MINGW @/foo cannot be\nused\" by skipping some tests using prerequisites instead?\n\n\n>  t/t1508-at-combinations.sh | 13 +++++++++++--\n>  1 file changed, 11 insertions(+), 2 deletions(-)\n>\n> diff --git a/t/t1508-at-combinations.sh b/t/t1508-at-combinations.sh\n> index 078e119..1d9fd7b 100755\n> --- a/t/t1508-at-combinations.sh\n> +++ b/t/t1508-at-combinations.sh\n> @@ -29,13 +29,22 @@ fail() {\n>  \t\"$@\" failure\n>  }\n>  \n> +if test_have_prereq MINGW\n> +then\n> +\t# MSYS2 interprets `@/abc` to be a file list, and wants to substitute\n> +\t# the Unix-y path with a Windows one (e.g. @C:\\msys64\\abc)\n> +\tAT_SLASH=@//at-test\n> +else\n> +\tAT_SLASH=@/at-test\n> +fi\n> +\n>  test_expect_success 'setup' '\n>  \ttest_commit master-one &&\n>  \ttest_commit master-two &&\n>  \tgit checkout -b upstream-branch &&\n>  \ttest_commit upstream-one &&\n>  \ttest_commit upstream-two &&\n> -\tgit checkout -b @/at-test &&\n> +\tgit checkout -b $AT_SLASH &&\n>  \tgit checkout -b @@/at-test &&\n>  \tgit checkout -b @at-test &&\n>  \tgit checkout -b old-branch &&\n> @@ -64,7 +73,7 @@ check \"@{-1}@{u}@{1}\" commit master-one\n>  check \"@\" commit new-two\n>  check \"@@{u}\" ref refs/heads/upstream-branch\n>  check \"@@/at-test\" ref refs/heads/@@/at-test\n> -check \"@/at-test\" ref refs/heads/@/at-test\n> +check \"$AT_SLASH\" ref refs/heads/@/at-test\n>  check \"@at-test\" ref refs/heads/@at-test\n>  nonsense \"@{u}@{-1}\"\n>  nonsense \"@{0}@{0}\"\n"},{"id":"276690","messageId":"xmqq60yibe89.fsf@gitster.mtv.corp.google.com","threadId":"41254","inReplyTo":"7c35a7b9c65d9febb6af1b50907988974bca3fbd.1453650173.git.johannes.schindelin@gmx.de","subject":"Re: [PATCH 16/19] mingw: avoid absolute path in t0008","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-01-25T02:11:02Z","receivedAt":"2016-01-25T02:11:02Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <johannes.schindelin@gmx.de> writes:\n\n> From: Pat Thoyts <patthoyts@users.sourceforge.net>\n>\n> The test separator char is a colon which means any absolute paths on\n> Windows confuse the tests that use global_excludes.\n>\n> Suggested-by: Karsten Blees <karsten.blees@gmail.com>\n> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>\n> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> ---\n>  t/t0008-ignores.sh | 8 +++++++-\n\nIs the fact that $global_excludes is specified using an absolute\npath significant to the correctness of this test script?  This patch\nsuggests me that it is not (i.e. if the tests chdir's around, then\nrelative reference to global-excludes file would not work at all,\nbut apparently tests run with MINGW prereq does not exhibit such an\nissue, so the remainder of the test would see the file we want it\nsee with the relative reference just fine).\n\nAnd in that case, I think it would be more correct to use the\n\"global-excludes in the current directory\" definition regardless of\nMINGW prerequisite.  Adding a comment that says \"The value of this\nvariable is a colon separated list, so avoid absolute path, because\n...\" is a very welcome addition while doing so.\n\nA larger question is if it would make more sense for Git ported to\nWindows environment to use semicolon (that is the element separator\nfor %PATH% in the Windows land, right?) instead where POSIXy port\nwould use colon as the separator.  A variable that is a list of\nlocations (e.g. $PATH) makes little sense when elements can only be\nrelative paths in practice.\n\n>  1 file changed, 7 insertions(+), 1 deletion(-)\n>\n> diff --git a/t/t0008-ignores.sh b/t/t0008-ignores.sh\n> index 4ef5ed4..68749f5 100755\n> --- a/t/t0008-ignores.sh\n> +++ b/t/t0008-ignores.sh\n> @@ -5,7 +5,13 @@ test_description=check-ignore\n>  . ./test-lib.sh\n>  \n>  init_vars () {\n> -\tglobal_excludes=\"$(pwd)/global-excludes\"\n> +\t# On Windows, avoid using \"C:\" in the global-excludes paths.\n> +\tif test_have_prereq MINGW\n> +\tthen\n> +\t\tglobal_excludes=\"global-excludes\"\n> +\telse\n> +\t\tglobal_excludes=\"$(pwd)/global-excludes\"\n> +\tfi\n>  }\n>  \n>  enable_global_excludes () {\n"},{"id":"276691","messageId":"CAPig+cTF0r1Z_4wre57pZHvPXT00TvhYTKmdHfDfTBZzMwdo+A@mail.gmail.com","threadId":"41254","inReplyTo":"80795bee09974f4bec6bda75fe9cb17a4326bed1.1453650173.git.johannes.schindelin@gmx.de","subject":"Re: [PATCH 05/19] mingw: prepare the TMPDIR environment variable for shell scripts","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2016-01-25T02:11:39Z","receivedAt":"2016-01-25T02:11:39Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Sun, Jan 24, 2016 at 10:43 AM, Johannes Schindelin\n<johannes.schindelin@gmx.de> wrote:\n> When shell scripts access a $TMPDIR variable containing backslashes,\n> they will be mistaken for escape characters. Let's not let that happen\n> by converting them to forward slashes.\n>\n> This partially fixes t7800 with MSYS2.\n>\n> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> ---\n> diff --git a/compat/mingw.c b/compat/mingw.c\n> @@ -2042,13 +2042,28 @@ int xwcstoutf(char *utf, const wchar_t *wcs, size_t utflen)\n>  static void setup_windows_environment()\n>  {\n> +       char *tmp = getenv(\"TMPDIR\");\n> +\n>         /* on Windows it is TMP and TEMP */\n> -       if (!getenv(\"TMPDIR\")) {\n> -               const char *tmp = getenv(\"TMP\");\n> -               if (!tmp)\n> +       if (tmp) {\n> +               if (!(tmp = getenv(\"TMP\")))\n>                         tmp = getenv(\"TEMP\");\n> -               if (tmp)\n> +               if (tmp) {\n>                         setenv(\"TMPDIR\", tmp, 1);\n> +                       tmp = getenv(\"TMPDIR\");\n> +               }\n> +       }\n\nLet me see if I understand this...\n\nIn the original code, if TMPDIR was *not* set, it would assign the\nvalue of TMP or TEMP to TEMPDIR.\n\nThe new code, however, checks TMP and TEMP only if TMPDIR is *already*\nset. Am I reading this correctly? Is this revised behavior correct?\n\n> +       if (tmp) {\n> +               /*\n> +                * Convert all dir separators to forward slashes,\n> +                * to help shell commands called from the Git\n> +                * executable (by not mistaking the dir separators\n> +                * for escape characters).\n> +                */\n> +               for (; *tmp; tmp++)\n> +                       if (*tmp == '\\\\')\n> +                               *tmp = '/';\n\nThis transformation is performed on whatever memory was returned by\ngetenv(). It is also performed after setenv(), so presumably setenv()\nisn't making a copy of the incoming string. Is that correct? Is it a\ngood idea to rely upon that detail of implementation (even if we\ncontrol the implementation, which I suppose is the case here)?\n\n>         }\n>\n>         /* simulate TERM to enable auto-color (see color.c) */\n> --\n> 2.7.0.windows.1.7.g55a05c8\n"},{"id":"276692","messageId":"xmqq1t96be2k.fsf@gitster.mtv.corp.google.com","threadId":"41254","inReplyTo":"9045a31ec16da672a74d9b1e0b65807d21ef277e.1453650173.git.johannes.schindelin@gmx.de","subject":"Re: [PATCH 17/19] mingw: fix git-svn tests that expect chmod to work","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-01-25T02:14:27Z","receivedAt":"2016-01-25T02:14:27Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <johannes.schindelin@gmx.de> writes:\n\n> From: 마누엘 <nalla@users.noreply.github.com>\n>\n> Some git-svn tests expect that the executable bit of files can be\n> toggled. On Windows, this is not possible because Windows' Access\n> Control Lists are much more fine-grained than the POSIX permission\n> concept. Let's just not try to flip the executable bit.\n\nMost of the changes are protected by !POSIXPERM but one of them\nseems to use MINGW, which looks inconsistent and I suspect was not a\ndistinction made on purpose.  The above description sounds to me\nthat the !POSIXPERM prerequisite is the right thing to use.\n\nI am not sure if it is a good idea to sprinkle test-have-prereq and\nmake the test script test different things on different platforms,\nthough.\n\n\n\n> This lets t9118-git-svn-funky-branch-names.sh and\n> t9124-git-svn-dcommit-auto-props.sh pass in Git for Windows' SDK,\n> and partially fixes t9100-git-svn-basic.sh.\n>\n> Signed-off-by: 마누엘 <nalla@users.noreply.github.com>\n> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> ---\n>  t/t9100-git-svn-basic.sh              |  5 ++++-\n>  t/t9118-git-svn-funky-branch-names.sh | 12 +++++++++---\n>  t/t9124-git-svn-dcommit-auto-props.sh | 20 ++++++++++++++++----\n>  3 files changed, 29 insertions(+), 8 deletions(-)\n>\n> diff --git a/t/t9100-git-svn-basic.sh b/t/t9100-git-svn-basic.sh\n> index dbb440b..bca7ec8 100755\n> --- a/t/t9100-git-svn-basic.sh\n> +++ b/t/t9100-git-svn-basic.sh\n> @@ -38,7 +38,10 @@ test_expect_success \\\n>  \t\tmkdir bar &&\n>  \t\techo \"zzz\" >bar/zzz &&\n>  \t\techo \"#!/bin/sh\" >exec.sh &&\n> -\t\tchmod +x exec.sh &&\n> +\t\t{\n> +\t\t\ttest_have_prereq !POSIXPERM ||\n> +\t\t\tchmod +x exec.sh\n> +\t\t} &&\n>  \t\tsvn_cmd import -m \"import for git svn\" . \"$svnrepo\" >/dev/null\n>  \t) &&\n>  \trm -rf import &&\n> diff --git a/t/t9118-git-svn-funky-branch-names.sh b/t/t9118-git-svn-funky-branch-names.sh\n> index a221915..49775a5 100755\n> --- a/t/t9118-git-svn-funky-branch-names.sh\n> +++ b/t/t9118-git-svn-funky-branch-names.sh\n> @@ -23,8 +23,11 @@ test_expect_success 'setup svnrepo' '\n>  \t              \"$svnrepo/pr ject/branches/$scary_uri\" &&\n>  \tsvn_cmd cp -m \"leading dot\" \"$svnrepo/pr ject/trunk\" \\\n>  \t\t\t\"$svnrepo/pr ject/branches/.leading_dot\" &&\n> -\tsvn_cmd cp -m \"trailing dot\" \"$svnrepo/pr ject/trunk\" \\\n> -\t\t\t\"$svnrepo/pr ject/branches/trailing_dot.\" &&\n> +\t{\n> +\t\ttest_have_prereq MINGW ||\n> +\t\tsvn_cmd cp -m \"trailing dot\" \"$svnrepo/pr ject/trunk\" \\\n> +\t\t\t\"$svnrepo/pr ject/branches/trailing_dot.\"\n> +\t} &&\n>  \tsvn_cmd cp -m \"trailing .lock\" \"$svnrepo/pr ject/trunk\" \\\n>  \t\t\t\"$svnrepo/pr ject/branches/trailing_dotlock.lock\" &&\n>  \tsvn_cmd cp -m \"reflog\" \"$svnrepo/pr ject/trunk\" \\\n> @@ -45,7 +48,10 @@ test_expect_success 'test clone with funky branch names' '\n>  \t\tgit rev-parse \"refs/remotes/origin/more%20fun%20plugin!\" &&\n>  \t\tgit rev-parse \"refs/remotes/origin/$scary_ref\" &&\n>  \t\tgit rev-parse \"refs/remotes/origin/%2Eleading_dot\" &&\n> -\t\tgit rev-parse \"refs/remotes/origin/trailing_dot%2E\" &&\n> +\t\t{\n> +\t\t\ttest_have_prereq MINGW ||\n> +\t\t\tgit rev-parse \"refs/remotes/origin/trailing_dot%2E\"\n> +\t\t} &&\n>  \t\tgit rev-parse \"refs/remotes/origin/trailing_dotlock%2Elock\" &&\n>  \t\tgit rev-parse \"refs/remotes/origin/$non_reflog\"\n>  \t)\n> diff --git a/t/t9124-git-svn-dcommit-auto-props.sh b/t/t9124-git-svn-dcommit-auto-props.sh\n> index aa841e1..c851121 100755\n> --- a/t/t9124-git-svn-dcommit-auto-props.sh\n> +++ b/t/t9124-git-svn-dcommit-auto-props.sh\n> @@ -35,7 +35,10 @@ test_expect_success 'enable auto-props config' '\n>  \n>  test_expect_success 'add files matcihng auto-props' '\n>  \techo \"#!$SHELL_PATH\" >exec1.sh &&\n> -\tchmod +x exec1.sh &&\n> +\t{\n> +\t\ttest_have_prereq !POSIXPERM ||\n> +\t\tchmod +x exec1.sh\n> +\t} &&\n>  \techo \"hello\" >hello.txt &&\n>  \techo bar >bar &&\n>  \tgit add exec1.sh hello.txt bar &&\n> @@ -49,7 +52,10 @@ test_expect_success 'disable auto-props config' '\n>  \n>  test_expect_success 'add files matching disabled auto-props' '\n>  \techo \"#$SHELL_PATH\" >exec2.sh &&\n> -\tchmod +x exec2.sh &&\n> +\t{\n> +\t\ttest_have_prereq !POSIXPERM ||\n> +\t\tchmod +x exec2.sh\n> +\t} &&\n>  \techo \"world\" >world.txt &&\n>  \techo zot >zot &&\n>  \tgit add exec2.sh world.txt zot &&\n> @@ -65,7 +71,10 @@ test_expect_success 'check resulting svn repository' '\n>  \tcd svnrepo &&\n>  \n>  \t# Check properties from first commit.\n> -\ttest \"x$(svn_cmd propget svn:executable exec1.sh)\" = \"x*\" &&\n> +\t{\n> +\t\ttest_have_prereq !POSIXPERM ||\n> +\t\ttest \"x$(svn_cmd propget svn:executable exec1.sh)\" = \"x*\"\n> +\t} &&\n>  \ttest \"x$(svn_cmd propget svn:mime-type exec1.sh)\" = \\\n>  \t     \"xapplication/x-shellscript\" &&\n>  \ttest \"x$(svn_cmd propget svn:mime-type hello.txt)\" = \"xtext/plain\" &&\n> @@ -73,7 +82,10 @@ test_expect_success 'check resulting svn repository' '\n>  \ttest \"x$(svn_cmd propget svn:mime-type bar)\" = \"x\" &&\n>  \n>  \t# Check properties from second commit.\n> -\ttest \"x$(svn_cmd propget svn:executable exec2.sh)\" = \"x*\" &&\n> +\t{\n> +\t\ttest_have_prereq !POSIXPERM ||\n> +\t\ttest \"x$(svn_cmd propget svn:executable exec2.sh)\" = \"x*\"\n> +\t} &&\n>  \ttest \"x$(svn_cmd propget svn:mime-type exec2.sh)\" = \"x\" &&\n>  \ttest \"x$(svn_cmd propget svn:mime-type world.txt)\" = \"x\" &&\n>  \ttest \"x$(svn_cmd propget svn:eol-style world.txt)\" = \"x\" &&\n"},{"id":"276693","messageId":"xmqqwpqy9ze9.fsf@gitster.mtv.corp.google.com","threadId":"41254","inReplyTo":"ff13c4125f268905baaa10a097ffdafe07eafb25.1453650173.git.johannes.schindelin@gmx.de","subject":"Re: [PATCH 18/19] mingw: skip a couple of git-svn tests that cannot pass on Windows","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-01-25T02:16:46Z","receivedAt":"2016-01-25T02:16:46Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <johannes.schindelin@gmx.de> writes:\n\n> Some of the tests expect that executable bits can be toggled, others\n> expect that paths are POSIX paths (but when they come through git.exe,\n> they are converted into Windows paths and necessarily differ), yet\n> others expect symbolic links to be available.\n\nThese skip the tests that cannot possibly pass in their entirety by\nprotecting them with prerequisites, which feels the right thing to\ndo.  The \"executable bits\" ones would need to become !POSIXPERM, and\nsymlink ones !SYMLINKS, though.\n\nThanks.\n\n> This lets t9100-git-svn-basic.sh and t9130-git-svn-authors-file.sh pass\n> in Git for Windows' SDK.\n>\n> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> ---\n>  t/t9100-git-svn-basic.sh        | 15 +++++++--------\n>  t/t9130-git-svn-authors-file.sh |  2 +-\n>  2 files changed, 8 insertions(+), 9 deletions(-)\n>\n> diff --git a/t/t9100-git-svn-basic.sh b/t/t9100-git-svn-basic.sh\n> index bca7ec8..8c74ffa 100755\n> --- a/t/t9100-git-svn-basic.sh\n> +++ b/t/t9100-git-svn-basic.sh\n> @@ -127,7 +127,7 @@ test_expect_success \"$name\" '\n>  \n>  \n>  name='remove executable bit from a file'\n> -test_expect_success \"$name\" '\n> +test_expect_success !MINGW \"$name\" '\n>  \trm -f \"$GIT_DIR\"/index &&\n>  \tgit checkout -f -b mybranch5 ${remotes_git_svn} &&\n>  \tchmod -x exec.sh &&\n> @@ -140,7 +140,7 @@ test_expect_success \"$name\" '\n>  \n>  \n>  name='add executable bit back file'\n> -test_expect_success \"$name\" '\n> +test_expect_success !MINGW \"$name\" '\n>  \tchmod +x exec.sh &&\n>  \tgit update-index exec.sh &&\n>  \tgit commit -m \"$name\" &&\n> @@ -151,7 +151,7 @@ test_expect_success \"$name\" '\n>  \n>  \n>  name='executable file becomes a symlink to file'\n> -test_expect_success \"$name\" '\n> +test_expect_success !MINGW \"$name\" '\n>  \trm exec.sh &&\n>  \tln -s file exec.sh &&\n>  \tgit update-index exec.sh &&\n> @@ -163,8 +163,7 @@ test_expect_success \"$name\" '\n>  \n>  name='new symlink is added to a file that was also just made executable'\n>  \n> -test_expect_success \"$name\" '\n> -\tchmod +x file &&\n> +test_expect_success !MINGW \"$name\" '\n>  \tln -s file exec-2.sh &&\n>  \tgit update-index --add file exec-2.sh &&\n>  \tgit commit -m \"$name\" &&\n> @@ -175,7 +174,7 @@ test_expect_success \"$name\" '\n>  \ttest -h \"$SVN_TREE\"/exec-2.sh'\n>  \n>  name='modify a symlink to become a file'\n> -test_expect_success \"$name\" '\n> +test_expect_success !MINGW \"$name\" '\n>  \techo git help >help &&\n>  \trm exec-2.sh &&\n>  \tcp help exec-2.sh &&\n> @@ -191,7 +190,7 @@ test_expect_success \"$name\" '\n>  name=\"commit with UTF-8 message: locale: $GIT_SVN_LC_ALL\"\n>  LC_ALL=\"$GIT_SVN_LC_ALL\"\n>  export LC_ALL\n> -test_expect_success UTF8 \"$name\" \"\n> +test_expect_success !MINGW,UTF8 \"$name\" \"\n>  \techo '# hello' >> exec-2.sh &&\n>  \tgit update-index exec-2.sh &&\n>  \tgit commit -m '???????' &&\n> @@ -224,7 +223,7 @@ tree d667270a1f7b109f5eb3aaea21ede14b56bfdd6e\n>  tree 8f51f74cf0163afc9ad68a4b1537288c4558b5a4\n>  EOF\n>  \n> -test_expect_success \"$name\" \"test_cmp a expected\"\n> +test_expect_success !MINGW \"$name\" \"test_cmp a expected\"\n>  \n>  test_expect_success 'exit if remote refs are ambigious' \"\n>          git config --add svn-remote.svn.fetch \\\n> diff --git a/t/t9130-git-svn-authors-file.sh b/t/t9130-git-svn-authors-file.sh\n> index d306b77..4126481 100755\n> --- a/t/t9130-git-svn-authors-file.sh\n> +++ b/t/t9130-git-svn-authors-file.sh\n> @@ -91,7 +91,7 @@ test_expect_success 'fetch continues after authors-file is fixed' '\n>  \t)\n>  \t'\n>  \n> -test_expect_success 'fresh clone with svn.authors-file in config' '\n> +test_expect_success !MINGW 'fresh clone with svn.authors-file in config' '\n>  \t(\n>  \t\trm -r \"$GIT_DIR\" &&\n>  \t\ttest x = x\"$(git config svn.authorsfile)\" &&\n"},{"id":"276698","messageId":"CAPig+cQfbJUtqu2F497Usaz3Ysf-5-vQgtg-0y8qh+FUQ=HeTA@mail.gmail.com","threadId":"41254","inReplyTo":"xmqqa8nubekj.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH 13/19] mingw: outsmart MSYS2's path substitution in t1508","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2016-01-25T06:22:21Z","receivedAt":"2016-01-25T06:22:21Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Sun, Jan 24, 2016 at 9:03 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> Johannes Schindelin <johannes.schindelin@gmx.de> writes:\n>> A string of the form \"@/abcd\" is considered a file path\n>> by the msys layer and therefore translated to a Windows path.\n>>\n>> Here the trick is to double the slashes.\n>>\n>> The MSYS2 patch translation can be studied by calling\n>>\n>>       test-path-utils print_path <path>\n>\n> This feels wrong.\n>\n> The point of this test is that you can ask to checkout a branch\n> whose name is a strangely looking \"@/at-test\", and a ref whose name\n> is \"refs/heads/@/at-test\" indeed is created.\n>\n> The current \"checkout\" may be lazy and not signal an error for a\n> branch name with two consecutive slashes, but I wouldn't be\n> surprised if we tighten that later, and more importantly, I do not\n> think we ever promised users if you asked a branch \"a//b\" to be\n> created, we would create \"refs/heads/a/b\".\n>\n> The new test hardcodes and promises such an incompatible behaviour,\n> i.e. a request to create \"@//b\" results in \"@/b\" created, only to\n> users on MINGW, fracturing the expectations of the Git userbase.\n\nWhat the commit message doesn't explain is that the MSYS2 Bash shell\nautomatically translates command-line arguments which look like\nabsolute POSIX paths into Windows paths on behalf of the program being\ninvoked. For instance, given the command-line:\n\n    myprog /fish\n\nthe shell will translate /fish to a Windows pathname, such as C:\\fish\nbefore invoking myprog.exe. While this is often the desired behavior,\nsometimes the argument represents something other than a path, and the\ntranslation is unwanted. MSYS provides a way to suppress the behavior\nmanually by doubling the slash, so:\n\n    myprog //fish\n\nwill invoke myprog.exe with literal argument /fish (notice the single slash).\n\nThis commit message is trying to say that MSYS shell undesirably sees\n@/fish as an absolute path, thus tries translating it to a Windows\npath, such as @C:\\fish. The only way to suppress this unwanted\ntranslation is to manually double the slash, hence the patch makes the\ntest use @//fish which, when finally seen by the program, is just\n@/fish, as was intended in the first place. So, doubling the slash on\nMINGW is not promising incompatible behavior for MINGW users; it's\njust working around unwanted path translation of the shell.\n"},{"id":"276700","messageId":"alpine.DEB.2.20.1601250753470.2964@virtualbox","threadId":"41254","inReplyTo":"4C2ED807DD184A168C87221809034B70@PhilipOakley","subject":"Re: [PATCH 06/19] mingw: try to delete target directory before renaming","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-25T06:59:49Z","receivedAt":"2016-01-25T06:59:49Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Philip,\n\nOn Sun, 24 Jan 2016, Philip Oakley wrote:\n\n> From: \"Johannes Schindelin\" <johannes.schindelin@gmx.de>\n> >From: 마누엘 <nalla@users.noreply.github.com>\n> \n> Is this Nalla's preferred email, or just a carry over from cautions of the\n> Github interface?\n\nNeither. It is from the author field as recorded in the commit that I\nmerged originally: https://github.com/dscho/git/pull/8\n\nCiao,\nDscho"},{"id":"276714","messageId":"alpine.DEB.2.20.1601251638580.2964@virtualbox","threadId":"41254","inReplyTo":"56A52B28.8010304@kdbg.org","subject":"Re: [PATCH 09/19] mingw: accomodate t0060-path-utils for MSYS2","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-25T15:39:45Z","receivedAt":"2016-01-25T15:39:45Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Hannes,\n\nOn Sun, 24 Jan 2016, Johannes Sixt wrote:\n\n> Am 24.01.2016 um 16:44 schrieb Johannes Schindelin:\n> > On Windows, there are no POSIX paths, only Windows ones (an absolute\n> > Windows path looks like \"C:\\Program Files\\Git\\ReleaseNotes.html\", under\n> > most circumstances, forward slashes are also allowed and synonymous to\n> > backslashes).\n> > \n> > So when a POSIX shell (such as MSYS2's Bash, which is used by Git for\n> > Windows to execute all those shell scripts that are part of Git) passes\n> > a POSIX path to test-path-utils.exe (which is not POSIX-aware), the path\n> > is translated into a Windows path. For example, /etc/profile becomes\n> > C:/Program Files/Git/etc/profile.\n> > \n> > This path translation poses a problem when passing the root directory as\n> > parameter to test-path-utils.exe, as it is not well defined whether the\n> > translated root directory should end in a slash or not. MSys1 stripped\n> > the trailing slash, but MSYS2 does not.\n> > \n> > To work with both behaviors, we simply test what the current system does\n> > in the beginning of t0060-path-utils.sh and then adjust the expected\n> > longest ancestor length accordingly.\n> > \n> > Originally, the Git for Windows project patched MSYS2's runtime to\n> > accomodate Git's regression test, but we really should do it the other\n> > way round.\n> > \n> > Thanks to Ray Donnelly for his patient help with this issue.\n> > \n> > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> > ---\n> >   t/t0060-path-utils.sh | 37 ++++++++++++++++++++++---------------\n> >   1 file changed, 22 insertions(+), 15 deletions(-)\n> > \n> > diff --git a/t/t0060-path-utils.sh b/t/t0060-path-utils.sh\n> > index f0152a7..89d03e7 100755\n> > --- a/t/t0060-path-utils.sh\n> > +++ b/t/t0060-path-utils.sh\n> > @@ -7,6 +7,13 @@ test_description='Test various path utilities'\n> >   \n> >   . ./test-lib.sh\n> >   \n> > +# On Windows, the root directory \"/\" is translated into a Windows directory.\n> > +# As it is not well-defined whether that Windows directory should end in a\n> > +# slash or not, let's test for that and adjust our expected longest ancestor\n> > +# length accordingly.\n> > +root_offset=0\n> > +case \"$(test-path-utils print_path /)\" in ?*/) root_offset=-1;; esac\n> > +\n> >   norm_path() {\n> >   \texpected=$(test-path-utils print_path \"$2\")\n> >   \ttest_expect_success $3 \"normalize path: $1 => $2\" \\\n> \n> In t0060-path-utils.sh, I currently find this:\n> \n> # On Windows, we are using MSYS's bash, which mangles the paths.\n> # Absolute paths are anchored at the MSYS installation directory,\n> # which means that the path / accounts for this many characters:\n> rootoff=$(test-path-utils normalize_path_copy / | wc -c)\n> # Account for the trailing LF:\n> if test $rootoff = 2; then\n> \trootoff=\t# we are on Unix\n> else\n> \trootoff=$(($rootoff-1))\n> fi\n> \n> ancestor() {\n> \t# We do some math with the expected ancestor length.\n> \texpected=$3\n> \tif test -n \"$rootoff\" && test \"x$expected\" != x-1; then\n> \t\texpected=$(($expected+$rootoff))\n> \tfi\n> \ttest_expect_success \"longest ancestor: $1 $2 => $expected\" \\\n> \t\"actual=\\$(test-path-utils longest_ancestor_length '$1' '$2') &&\n> \t test \\\"\\$actual\\\" = '$expected'\"\n> }\n> \n> Furthermore, since you are modifying only cases where the expected\n> value is not -1 and we already have a check for this case in the\n> helper function, wouldn't it be simpler to merge the offset that your\n> case needs with the one that we already have?\n\nGood points. I reworked the patch here (will be part of v2):\nhttps://github.com/dscho/git/commit/24767bd\n\nCiao,\nDscho\n"},{"id":"276715","messageId":"alpine.DEB.2.20.1601251643320.2964@virtualbox","threadId":"41254","inReplyTo":"xmqqmvrubfxr.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH 00/19] Let Git's tests pass on Windows","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-25T15:45:22Z","receivedAt":"2016-01-25T15:45:22Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Sun, 24 Jan 2016, Junio C Hamano wrote:\n\n> Johannes Schindelin <johannes.schindelin@gmx.de> writes:\n> \n> > This is a big milestone. With these modifications, Git's source code\n> > does not only build without warnings in Git for Windows' SDK, but\n> > passes the entire regression test suite.\n> \n> ;-)\n> \n> It is somewhat surprising that with only these changes my tree is no\n> longer behind the Git for Windows effort--all tests pass so everything\n> should be working perfectly, right ;-)\n\nOh, don't you worry, there are plenty more patches in Git for Windows'\nfork. Some of them will become irrelevant, others probably already did so.\nThe majority, though, I think will be of interest and I will submit them\nover the next weeks/months (it will take a while not only because I do not\nwant to overload the list, but also because I have to do quite a bit of\nspring cleaning).\n\n> There were a few changes in the series that raised my eyebrows,\n> which I'll respond separately, but overall it's a great\n> achievement.\n\nThanks!\nDscho\n"},{"id":"276716","messageId":"alpine.DEB.2.20.1601251714380.2964@virtualbox","threadId":"41254","inReplyTo":"xmqqio2ibfkn.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH 01/19] mingw: let's use gettext with MSYS2","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-25T16:16:48Z","receivedAt":"2016-01-25T16:16:48Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Sun, 24 Jan 2016, Junio C Hamano wrote:\n\n> Johannes Schindelin <johannes.schindelin@gmx.de> writes:\n> \n> > This solves two problems:\n> >\n> > - we now have proper localisation even on Windows\n> >\n> > - we sidestep the infamous \"BUG: your vsnprintf is broken (returned -1)\"\n> >   message when running \"git init\" (which otherwise prevents the entire\n> >   test suite from running)\n> \n> It is unclear to me how gettext is related to use of vsnprintf().\n\nIncluding libintl.h overrides vsnprintf() with the libintl_vsnprintf()\ndrop-in replacement that does return the expected value.\n\nI updated the commit message (will be part of v2):\n\n\thttps://github.com/dscho/git/commit/4473801e\n\nCiao,\nDscho\n"},{"id":"276717","messageId":"alpine.DEB.2.20.1601251727370.2964@virtualbox","threadId":"41254","inReplyTo":"xmqqa8nubekj.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH 13/19] mingw: outsmart MSYS2's path substitution in t1508","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-25T16:30:37Z","receivedAt":"2016-01-25T16:30:37Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Sun, 24 Jan 2016, Junio C Hamano wrote:\n\n> Johannes Schindelin <johannes.schindelin@gmx.de> writes:\n> \n> > From: Thomas Braun <thomas.braun@byte-physics.de>\n> >\n> > A string of the form \"@/abcd\" is considered a file path\n> > by the msys layer and therefore translated to a Windows path.\n> >\n> > Here the trick is to double the slashes.\n> >\n> > The MSYS2 patch translation can be studied by calling\n> >\n> > \ttest-path-utils print_path <path>\n> >\n> > Signed-off-by: Thomas Braun <thomas.braun@byte-physics.de>\n> > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> > ---\n> \n> This feels wrong.\n> \n> The point of this test is that you can ask to checkout a branch\n> whose name is a strangely looking \"@/at-test\", and a ref whose name\n> is \"refs/heads/@/at-test\" indeed is created.\n> \n> The current \"checkout\" may be lazy and not signal an error for a\n> branch name with two consecutive slashes, but I wouldn't be\n> surprised if we tighten that later, and more importantly, I do not\n> think we ever promised users if you asked a branch \"a//b\" to be\n> created, we would create \"refs/heads/a/b\".\n> \n> The new test hardcodes and promises such an incompatible behaviour,\n> i.e. a request to create \"@//b\" results in \"@/b\" created, only to\n> users on MINGW, fracturing the expectations of the Git userbase.\n> \n> Wouldn't it be better to declare \"On other people's Git, @/foo is\n> just as normal a branch name as a/foo, but on MINGW @/foo cannot be\n> used\" by skipping some tests using prerequisites instead?\n\nAs Eric points out, this is not so much a behavior on Git as of the MSYS2\nBash. In fact, if you call `git.exe checkout -b @/at-test` from a cmd\nwindow, it works just as advertised.\n\nBut your comment made me inspect the entire t9100 again, wondering why\nthings work when we copy the contents instead of symlinking them. And you\nknow what, even if I could have sworn that I verified for every patch in\nthis series that it is actually necessary to pass the test suite, it is\n*not* necessary.\n\nSo I backed it out and it won't be part of v2 anymore.\n\nCiao,\nDscho\n"},{"id":"276718","messageId":"alpine.DEB.2.20.1601251747050.2964@virtualbox","threadId":"41254","inReplyTo":"xmqq60yibe89.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH 16/19] mingw: avoid absolute path in t0008","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-25T16:48:37Z","receivedAt":"2016-01-25T16:48:37Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Sun, 24 Jan 2016, Junio C Hamano wrote:\n\n> Johannes Schindelin <johannes.schindelin@gmx.de> writes:\n> \n> > From: Pat Thoyts <patthoyts@users.sourceforge.net>\n> >\n> > The test separator char is a colon which means any absolute paths on\n> > Windows confuse the tests that use global_excludes.\n> >\n> > Suggested-by: Karsten Blees <karsten.blees@gmail.com>\n> > Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>\n> > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> > ---\n> >  t/t0008-ignores.sh | 8 +++++++-\n> \n> Is the fact that $global_excludes is specified using an absolute\n> path significant to the correctness of this test script?\n\nApparently not. So I followed your suggestion and made this independent\nof the OS:\n\n\thttps://github.com/dscho/git/commit/0b9eb308\n\n> A larger question is if it would make more sense for Git ported to\n> Windows environment to use semicolon (that is the element separator\n> for %PATH% in the Windows land, right?) instead where POSIXy port\n> would use colon as the separator.  A variable that is a list of\n> locations (e.g. $PATH) makes little sense when elements can only be\n> relative paths in practice.\n\nOh my... I was not looking for more work ;-)\n\nSeriously again, I do agree with the suggestion to use semicolons on\nWindows as path lists' separators instead of colons.\n\nCiao,\nDscho\n"},{"id":"276719","messageId":"alpine.DEB.2.20.1601251752450.2964@virtualbox","threadId":"41254","inReplyTo":"xmqqegd6bf4j.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH 12/19] mingw: do not use symlinks with SVN in t9100","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-25T16:53:45Z","receivedAt":"2016-01-25T16:53:45Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Sun, 24 Jan 2016, Junio C Hamano wrote:\n\n> Johannes Schindelin <johannes.schindelin@gmx.de> writes:\n> \n> > From: Karsten Blees <blees@dcon.de>\n> >\n> > The SVN library does not seem to support symlinks, even if symlinks are\n> > enabled in MSYS2 and Git. Use 'cp' instead of 'ln -s'.\n> >\n> > This partially fixes t/t9100-git-svn-basic.sh\n> >\n> > Signed-off-by: Karsten Blees <blees@dcon.de>\n> > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> > ---\n> >  t/t9100-git-svn-basic.sh | 9 ++++++++-\n> >  1 file changed, 8 insertions(+), 1 deletion(-)\n> \n> For the purpose of SVN test, is it important that foo.link is a link\n> to foo?  I am wondering what would be the fallout from making this\n> change without \"only on MINGW do this\".\n\n(I originally sent the following response as a reply to 13/19 by mistake.)\n\nYour comment made me inspect the entire t9100 again, wondering why things\nwork when we copy the contents instead of symlinking them. And you know\nwhat, even if I could have sworn that I verified for every patch in this\nseries that it is actually necessary to pass the test suite, it is *not*\nnecessary.\n\nSo I backed it out and it won't be part of v2 anymore.\n\nCiao,\nDscho\n"},{"id":"276720","messageId":"alpine.DEB.2.20.1601251751350.2964@virtualbox","threadId":"41254","inReplyTo":"alpine.DEB.2.20.1601251727370.2964@virtualbox","subject":"Re: [PATCH 13/19] mingw: outsmart MSYS2's path substitution in t1508","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-25T17:04:40Z","receivedAt":"2016-01-25T17:04:40Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Mon, 25 Jan 2016, Johannes Schindelin wrote:\n\n> On Sun, 24 Jan 2016, Junio C Hamano wrote:\n> \n> > Johannes Schindelin <johannes.schindelin@gmx.de> writes:\n> > \n> > > From: Thomas Braun <thomas.braun@byte-physics.de>\n> > >\n> > > A string of the form \"@/abcd\" is considered a file path\n> > > by the msys layer and therefore translated to a Windows path.\n> > >\n> > > Here the trick is to double the slashes.\n> > >\n> > > The MSYS2 patch translation can be studied by calling\n> > >\n> > > \ttest-path-utils print_path <path>\n> > >\n> > > Signed-off-by: Thomas Braun <thomas.braun@byte-physics.de>\n> > > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> > > ---\n> > \n> > This feels wrong.\n> > \n> > The point of this test is that you can ask to checkout a branch\n> > whose name is a strangely looking \"@/at-test\", and a ref whose name\n> > is \"refs/heads/@/at-test\" indeed is created.\n> > \n> > The current \"checkout\" may be lazy and not signal an error for a\n> > branch name with two consecutive slashes, but I wouldn't be\n> > surprised if we tighten that later, and more importantly, I do not\n> > think we ever promised users if you asked a branch \"a//b\" to be\n> > created, we would create \"refs/heads/a/b\".\n> > \n> > The new test hardcodes and promises such an incompatible behaviour,\n> > i.e. a request to create \"@//b\" results in \"@/b\" created, only to\n> > users on MINGW, fracturing the expectations of the Git userbase.\n> > \n> > Wouldn't it be better to declare \"On other people's Git, @/foo is\n> > just as normal a branch name as a/foo, but on MINGW @/foo cannot be\n> > used\" by skipping some tests using prerequisites instead?\n> \n> As Eric points out, this is not so much a behavior on Git as of the MSYS2\n> Bash. In fact, if you call `git.exe checkout -b @/at-test` from a cmd\n> window, it works just as advertised.\n> \n> But your comment made me inspect the entire t9100 again, wondering why\n> things work when we copy the contents instead of symlinking them. And you\n> know what, even if I could have sworn that I verified for every patch in\n> this series that it is actually necessary to pass the test suite, it is\n> *not* necessary.\n> \n> So I backed it out and it won't be part of v2 anymore.\n\nWhoops. This was meant to be a comment on your comment on 12/19. I'll\nreply to the appropriate mail...\n\nAs to the patch 13/19 that we are discussing here, I agree that it is\nbetter to simply skip the test with the offending argument. See\n\n\thttps://github.com/dscho/git/commit/ca5edbe\n\nCiao,\nDscho\n"},{"id":"276723","messageId":"xmqqd1sph4so.fsf@gitster.mtv.corp.google.com","threadId":"41254","inReplyTo":"CAPig+cQfbJUtqu2F497Usaz3Ysf-5-vQgtg-0y8qh+FUQ=HeTA@mail.gmail.com","subject":"Re: [PATCH 13/19] mingw: outsmart MSYS2's path substitution in t1508","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-01-25T18:50:31Z","receivedAt":"2016-01-25T18:50:31Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Sunshine <sunshine@sunshineco.com> writes:\n\n> On Sun, Jan 24, 2016 at 9:03 PM, Junio C Hamano <gitster@pobox.com> wrote:\n>> The new test hardcodes and promises such an incompatible behaviour,\n>> i.e. a request to create \"@//b\" results in \"@/b\" created, only to\n>> users on MINGW, fracturing the expectations of the Git userbase.\n>\n> What the commit message doesn't explain is that ...\n> ...\n> This commit message is trying to say that MSYS shell undesirably sees\n> @/fish as an absolute path, thus tries translating it to a Windows\n> path, such as @C:\\fish. The only way to suppress this unwanted\n> translation is to manually double the slash, hence the patch makes the\n> test use @//fish which, when finally seen by the program, is just\n> @/fish, as was intended in the first place. So, doubling the slash on\n> MINGW is not promising incompatible behavior for MINGW users; it's\n> just working around unwanted path translation of the shell.\n\nAh, OK, thanks for clarifying it.  Presumably you would then use\n\"checkout @//b\" to switch to it, and \"log @//b\" to look at its\nhsitory.  When you read \"git branch\" output and see \"@/b\" in it, you\nwould also not complain thinking \"oh I thought I created \"@//b\", not\nwith a single branch!\".\n\nThen no issues on allowing \"checkout -b @//b\" to create a branch\n\"@/b\" from me.\n\nThanks.\n"},{"id":"276724","messageId":"xmqq8u3dh4nv.fsf@gitster.mtv.corp.google.com","threadId":"41254","inReplyTo":"alpine.DEB.2.20.1601251714380.2964@virtualbox","subject":"Re: [PATCH 01/19] mingw: let's use gettext with MSYS2","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-01-25T18:53:24Z","receivedAt":"2016-01-25T18:53:24Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n>> > - we sidestep the infamous \"BUG: your vsnprintf is broken (returned -1)\"\n>> >   message when running \"git init\" (which otherwise prevents the entire\n>> >   test suite from running)\n>> \n>> It is unclear to me how gettext is related to use of vsnprintf().\n>\n> Including libintl.h overrides vsnprintf() with the libintl_vsnprintf()\n> drop-in replacement that does return the expected value.\n\nAh, that makes sense.\n\n>\n> I updated the commit message (will be part of v2):\n>\n> \thttps://github.com/dscho/git/commit/4473801e\n\nThanks.\n"},{"id":"276725","messageId":"xmqq4me1h4k2.fsf@gitster.mtv.corp.google.com","threadId":"41254","inReplyTo":"alpine.DEB.2.20.1601250753470.2964@virtualbox","subject":"Re: [PATCH 06/19] mingw: try to delete target directory before renaming","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-01-25T18:55:41Z","receivedAt":"2016-01-25T18:55:41Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> Hi Philip,\n>\n> On Sun, 24 Jan 2016, Philip Oakley wrote:\n>\n>> From: \"Johannes Schindelin\" <johannes.schindelin@gmx.de>\n>> >From: 마누엘 <nalla@users.noreply.github.com>\n>> \n>> Is this Nalla's preferred email, or just a carry over from cautions of the\n>> Github interface?\n>\n> Neither. It is from the author field as recorded in the commit that I\n> merged originally: https://github.com/dscho/git/pull/8\n\nIf it is not recorded under the name/email that is preferred by the\nauthor, as I am not pulling from you but will be applying a patch,\nwe can fix it to match the author's desire, if we wanted to.\n\nYour \"Neither\" hints that it is the case, but it is unclear to me\nwhat address is the desired one (I can guess hamal.uberspace might\nbe), so...\n"},{"id":"276730","messageId":"CAOYw7dsBPCXhUGfcZs4GGe8P+=mSCHdhEQ3wYRExrQSJs7Nq6g@mail.gmail.com","threadId":"41254","inReplyTo":"alpine.DEB.2.20.1601251747050.2964@virtualbox","subject":"Re: [PATCH 16/19] mingw: avoid absolute path in t0008","fromName":"Ray Donnelly","fromEmail":"mingw.android@gmail.com","sentAt":"2016-01-25T19:31:07Z","receivedAt":"2016-01-25T19:31:07Z","isPatch":true,"sender":{"key":"mingw.android@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1042804?v=4"},"body":"On Mon, Jan 25, 2016 at 4:48 PM, Johannes Schindelin\n<Johannes.Schindelin@gmx.de> wrote:\n> Hi Junio,\n>\n> On Sun, 24 Jan 2016, Junio C Hamano wrote:\n>\n>> Johannes Schindelin <johannes.schindelin@gmx.de> writes:\n>>\n>> > From: Pat Thoyts <patthoyts@users.sourceforge.net>\n>> >\n>> > The test separator char is a colon which means any absolute paths on\n>> > Windows confuse the tests that use global_excludes.\n>> >\n>> > Suggested-by: Karsten Blees <karsten.blees@gmail.com>\n>> > Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>\n>> > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n>> > ---\n>> >  t/t0008-ignores.sh | 8 +++++++-\n>>\n>> Is the fact that $global_excludes is specified using an absolute\n>> path significant to the correctness of this test script?\n>\n> Apparently not. So I followed your suggestion and made this independent\n> of the OS:\n>\n>         https://github.com/dscho/git/commit/0b9eb308\n>\n>> A larger question is if it would make more sense for Git ported to\n>> Windows environment to use semicolon (that is the element separator\n>> for %PATH% in the Windows land, right?) instead where POSIXy port\n>> would use colon as the separator.  A variable that is a list of\n>> locations (e.g. $PATH) makes little sense when elements can only be\n>> relative paths in practice.\n>\n> Oh my... I was not looking for more work ;-)\n>\n> Seriously again, I do agree with the suggestion to use semicolons on\n> Windows as path lists' separators instead of colons.\n\nIt definitely makes things easier from the MSYS2 path conversion\nperspective. Anything that can be done to make this easier is hugely\nappreciated.\n\n>\n> Ciao,\n> Dscho\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n"},{"id":"276742","messageId":"xmqq1t95fgig.fsf@gitster.mtv.corp.google.com","threadId":"41254","inReplyTo":"alpine.DEB.2.20.1601251747050.2964@virtualbox","subject":"Re: [PATCH 16/19] mingw: avoid absolute path in t0008","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-01-25T22:20:23Z","receivedAt":"2016-01-25T22:20:23Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n>> Is the fact that $global_excludes is specified using an absolute\n>> path significant to the correctness of this test script?\n>\n> Apparently not. So I followed your suggestion and made this independent\n> of the OS:\n>\n> \thttps://github.com/dscho/git/commit/0b9eb308\n\nI see many \"cd\" in the script, some of which come before the global\nexclude file is enabled, but others (\"--stdin from subdirectory\",\nfor example) do run from a subdirectory.  It turns out that this\nfile is used as the value of core.excludesfile.  By the time that\nfile is read in setup_standard_excludes(), presumably we have\nalready done setup_git_directory() and moved back to the root of the\nworking tree, so I guess such a change would be harmless.\n\nIt somehow makes me feel dirty, though.  But that is not a specific\nproblem to mingw port.\n"},{"id":"276758","messageId":"alpine.DEB.2.20.1601251910080.2964@virtualbox","threadId":"41254","inReplyTo":"xmqq1t96be2k.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH 17/19] mingw: fix git-svn tests that expect chmod to work","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-26T06:31:27Z","receivedAt":"2016-01-26T06:31:27Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Sun, 24 Jan 2016, Junio C Hamano wrote:\n\n> Johannes Schindelin <johannes.schindelin@gmx.de> writes:\n> \n> > From: 마누엘 <nalla@users.noreply.github.com>\n> >\n> > Some git-svn tests expect that the executable bit of files can be\n> > toggled. On Windows, this is not possible because Windows' Access\n> > Control Lists are much more fine-grained than the POSIX permission\n> > concept. Let's just not try to flip the executable bit.\n> \n> Most of the changes are protected by !POSIXPERM but one of them\n> seems to use MINGW, which looks inconsistent and I suspect was not a\n> distinction made on purpose.  The above description sounds to me\n> that the !POSIXPERM prerequisite is the right thing to use.\n\nThis is my fault: there are two MINGW prereqs, and they guard against\ntrying to work with file names ending in a dot (which is illegal on\nWindows' file systems).\n\nMy original plan was to split the patch into two, but I actually reworked\nthe patch from scratch.\n\n> I am not sure if it is a good idea to sprinkle test-have-prereq and\n> make the test script test different things on different platforms,\n> though.\n\nI agree that this is not desirable, and I changed it where possible to\nsimply skip the entire test case. In some cases, however, the 'setup' test\ncase was affected, and of course we cannot skip that one, else everything\nfalls apart.\n\nThe result of my work consists of these three patches (which will be part\nof v2):\n\n\thttps://github.com/dscho/git/compare/ea813597~3...ea813597\n\nThanks,\nDscho"},{"id":"276759","messageId":"alpine.DEB.2.20.1601260733290.2964@virtualbox","threadId":"41254","inReplyTo":"xmqqwpqy9ze9.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH 18/19] mingw: skip a couple of git-svn tests that cannot pass on Windows","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-26T06:45:27Z","receivedAt":"2016-01-26T06:45:27Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Sun, 24 Jan 2016, Junio C Hamano wrote:\n\n> Johannes Schindelin <johannes.schindelin@gmx.de> writes:\n> \n> > Some of the tests expect that executable bits can be toggled, others\n> > expect that paths are POSIX paths (but when they come through git.exe,\n> > they are converted into Windows paths and necessarily differ), yet\n> > others expect symbolic links to be available.\n> \n> These skip the tests that cannot possibly pass in their entirety by\n> protecting them with prerequisites, which feels the right thing to\n> do.  The \"executable bits\" ones would need to become !POSIXPERM, and\n> symlink ones !SYMLINKS, though.\n\nI reworked this in the same batch as the previous git-svn patch.\n\nCiao,\nDscho\n"},{"id":"276762","messageId":"alpine.DEB.2.20.1601260747180.2964@virtualbox","threadId":"41254","inReplyTo":"xmqqd1sph4so.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH 13/19] mingw: outsmart MSYS2's path substitution in t1508","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-26T06:53:37Z","receivedAt":"2016-01-26T06:53:37Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Mon, 25 Jan 2016, Junio C Hamano wrote:\n\n> Eric Sunshine <sunshine@sunshineco.com> writes:\n> \n> > On Sun, Jan 24, 2016 at 9:03 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> >> The new test hardcodes and promises such an incompatible behaviour,\n> >> i.e. a request to create \"@//b\" results in \"@/b\" created, only to\n> >> users on MINGW, fracturing the expectations of the Git userbase.\n> >\n> > What the commit message doesn't explain is that ...\n> > ...\n> > This commit message is trying to say that MSYS shell undesirably sees\n> > @/fish as an absolute path, thus tries translating it to a Windows\n> > path, such as @C:\\fish. The only way to suppress this unwanted\n> > translation is to manually double the slash, hence the patch makes the\n> > test use @//fish which, when finally seen by the program, is just\n> > @/fish, as was intended in the first place. So, doubling the slash on\n> > MINGW is not promising incompatible behavior for MINGW users; it's\n> > just working around unwanted path translation of the shell.\n> \n> Ah, OK, thanks for clarifying it.  Presumably you would then use\n> \"checkout @//b\" to switch to it, and \"log @//b\" to look at its\n> hsitory.  When you read \"git branch\" output and see \"@/b\" in it, you\n> would also not complain thinking \"oh I thought I created \"@//b\", not\n> with a single branch!\".\n> \n> Then no issues on allowing \"checkout -b @//b\" to create a branch\n> \"@/b\" from me.\n\nI actually disabled the test for MINGW instead, as I agree that we do not\nwant to test MSYS2 in our regression tests.\n\nCiao,\nDscho\n"},{"id":"276764","messageId":"alpine.DEB.2.20.1601260758070.2964@virtualbox","threadId":"41254","inReplyTo":"xmqq1t95fgig.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH 16/19] mingw: avoid absolute path in t0008","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-26T08:00:36Z","receivedAt":"2016-01-26T08:00:36Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Mon, 25 Jan 2016, Junio C Hamano wrote:\n\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> \n> >> Is the fact that $global_excludes is specified using an absolute\n> >> path significant to the correctness of this test script?\n> >\n> > Apparently not. So I followed your suggestion and made this independent\n> > of the OS:\n> >\n> > \thttps://github.com/dscho/git/commit/0b9eb308\n> \n> I see many \"cd\" in the script, some of which come before the global\n> exclude file is enabled, but others (\"--stdin from subdirectory\",\n> for example) do run from a subdirectory.  It turns out that this\n> file is used as the value of core.excludesfile.  By the time that\n> file is read in setup_standard_excludes(), presumably we have\n> already done setup_git_directory() and moved back to the root of the\n> working tree, so I guess such a change would be harmless.\n\nYeah, it appears that after the entire test ran, there is only one\nglobal-excludes file, and none of the `rm` commands removes any\nglobal-excludes file.\n\n> It somehow makes me feel dirty, though.  But that is not a specific\n> problem to mingw port.\n\nWell, I found the entire file a little hard to read ;-) But yeah, I do not\nthink that is specific to the Windows port.\n\nCiao,\nDscho\n"},{"id":"276765","messageId":"alpine.DEB.2.20.1601260900550.2964@virtualbox","threadId":"41254","inReplyTo":"xmqq4me1h4k2.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH 06/19] mingw: try to delete target directory before renaming","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-26T08:14:12Z","receivedAt":"2016-01-26T08:14:12Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Mon, 25 Jan 2016, Junio C Hamano wrote:\n\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> \n> > On Sun, 24 Jan 2016, Philip Oakley wrote:\n> >\n> >> From: \"Johannes Schindelin\" <johannes.schindelin@gmx.de>\n> >> >From: 마누엘 <nalla@users.noreply.github.com>\n> >> \n> >> Is this Nalla's preferred email, or just a carry over from cautions\n> >> of the Github interface?\n> >\n> > Neither. It is from the author field as recorded in the commit that I\n> > merged originally: https://github.com/dscho/git/pull/8\n> \n> If it is not recorded under the name/email that is preferred by the\n> author, as I am not pulling from you but will be applying a patch,\n> we can fix it to match the author's desire, if we wanted to.\n> \n> Your \"Neither\" hints that it is the case, but it is unclear to me\n> what address is the desired one (I can guess hamal.uberspace might\n> be), so...\n\nThe author clarified to me that the noreply \"address\" was used only in the\nearly patches, but the uberspace one is the preferred one.\n\nI fixed it in my branch; v2 will have the fix.\n\nCiao,\nDscho"},{"id":"276766","messageId":"alpine.DEB.2.20.1601260934040.2964@virtualbox","threadId":"41254","inReplyTo":"CAPig+cTF0r1Z_4wre57pZHvPXT00TvhYTKmdHfDfTBZzMwdo+A@mail.gmail.com","subject":"Re: [PATCH 05/19] mingw: prepare the TMPDIR environment variable for shell scripts","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-26T08:38:05Z","receivedAt":"2016-01-26T08:38:05Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Eric,\n\nOn Sun, 24 Jan 2016, Eric Sunshine wrote:\n\n> On Sun, Jan 24, 2016 at 10:43 AM, Johannes Schindelin\n> <johannes.schindelin@gmx.de> wrote:\n> > When shell scripts access a $TMPDIR variable containing backslashes,\n> > they will be mistaken for escape characters. Let's not let that happen\n> > by converting them to forward slashes.\n> >\n> > This partially fixes t7800 with MSYS2.\n> >\n> > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> > ---\n> > diff --git a/compat/mingw.c b/compat/mingw.c\n> > @@ -2042,13 +2042,28 @@ int xwcstoutf(char *utf, const wchar_t *wcs, size_t utflen)\n> >  static void setup_windows_environment()\n> >  {\n> > +       char *tmp = getenv(\"TMPDIR\");\n> > +\n> >         /* on Windows it is TMP and TEMP */\n> > -       if (!getenv(\"TMPDIR\")) {\n> > -               const char *tmp = getenv(\"TMP\");\n> > -               if (!tmp)\n> > +       if (tmp) {\n> > +               if (!(tmp = getenv(\"TMP\")))\n> >                         tmp = getenv(\"TEMP\");\n> > -               if (tmp)\n> > +               if (tmp) {\n> >                         setenv(\"TMPDIR\", tmp, 1);\n> > +                       tmp = getenv(\"TMPDIR\");\n> > +               }\n> > +       }\n> \n> Let me see if I understand this...\n> \n> In the original code, if TMPDIR was *not* set, it would assign the\n> value of TMP or TEMP to TEMPDIR.\n> \n> The new code, however, checks TMP and TEMP only if TMPDIR is *already*\n> set. Am I reading this correctly? Is this revised behavior correct?\n\nGaaah! When copy-pasting, I culled the exclamation point... Will be fixed\nin v2 (see https://github.com/dscho/git/commit/909b0a413)\n\n> > +       if (tmp) {\n> > +               /*\n> > +                * Convert all dir separators to forward slashes,\n> > +                * to help shell commands called from the Git\n> > +                * executable (by not mistaking the dir separators\n> > +                * for escape characters).\n> > +                */\n> > +               for (; *tmp; tmp++)\n> > +                       if (*tmp == '\\\\')\n> > +                               *tmp = '/';\n> \n> This transformation is performed on whatever memory was returned by\n> getenv(). It is also performed after setenv(), so presumably setenv()\n> isn't making a copy of the incoming string.\n\nActually, I made sure to re-getenv() after setenv():\n\n\thttps://github.com/dscho/git/blob/909b0a413/compat/mingw.c#L2053\n\nThanks!\nDscho\n"},{"id":"276793","messageId":"cover.1453818789.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453650173.git.johannes.schindelin@gmx.de","subject":"[PATCH v2 00/19] Let Git's tests pass on Windows","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-26T14:34:07Z","receivedAt":"2016-01-26T14:34:07Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"This is a big milestone. With these modifications, Git's source code\ndoes not only build without warnings in Git for Windows' SDK, but\npasses the entire regression test suite.\n\nThe patch series contains three different types of patches. First,\nthere are a couple of real fixes that were triggered by failures in\nthe regression tests. Then there are a couple of fixes to the\nregression tests themselves. And finally, we have to disable a couple\nof tests because we simply cannot make them work on Windows.\n\n\nJohannes Schindelin (16):\n  mingw: let's use gettext with MSYS2\n  mingw: do not trust MSYS2's MinGW gettext.sh\n  Git.pm: stop assuming that absolute paths start with a slash\n  mingw: prepare the TMPDIR environment variable for shell scripts\n  mingw: let lstat() fail with errno == ENOTDIR when appropriate\n  mingw: fix t5601-clone.sh\n  mingw: accomodate t0060-path-utils for MSYS2\n  mingw: disable mkfifo-based tests\n  tests: turn off git-daemon tests if FIFOs are not available\n  mingw: skip test in t1508 that fails due to path conversion\n  mingw: fix t9700's assumption about directory separators\n  mingw: work around pwd issues in the tests\n  mingw: mark t9100's test cases with appropriate prereqs\n  mingw: avoid illegal filename in t9118\n  mingw: handle the missing POSIXPERM prereq in t9124\n  mingw: do not bother to test funny file names\n\nKarsten Blees (1):\n  mingw: factor out Windows specific environment setup\n\nPat Thoyts (1):\n  Avoid absolute path in t0008\n\n마누엘 (1):\n  mingw: try to delete target directory before renaming\n\n Makefile                              |  1 +\n compat/mingw.c                        | 91 +++++++++++++++++++++++++++++------\n config.mak.uname                      |  3 +-\n perl/Git.pm                           |  3 +-\n t/lib-git-daemon.sh                   |  5 ++\n t/t0008-ignores.sh                    |  2 +-\n t/t0060-path-utils.sh                 |  9 ++++\n t/t1508-at-combinations.sh            |  6 ++-\n t/t3300-funny-names.sh                |  1 +\n t/t3600-rm.sh                         |  3 +-\n t/t3703-add-magic-pathspec.sh         |  2 +-\n t/t3902-quoted.sh                     |  1 +\n t/t4016-diff-quote.sh                 |  1 +\n t/t4135-apply-weird-filenames.sh      |  3 +-\n t/t5601-clone.sh                      | 18 +++----\n t/t7800-difftool.sh                   | 14 +++---\n t/t9100-git-svn-basic.sh              | 18 +++----\n t/t9118-git-svn-funky-branch-names.sh | 12 +++--\n t/t9124-git-svn-dcommit-auto-props.sh | 16 +++---\n t/t9200-git-cvsexportcommit.sh        |  2 +-\n t/t9400-git-cvsserver-server.sh       |  6 +--\n t/t9401-git-cvsserver-crlf.sh         |  6 +--\n t/t9402-git-cvsserver-refs.sh         |  6 +--\n t/t9700/test.pl                       |  2 +-\n t/t9903-bash-prompt.sh                |  2 +-\n t/test-lib.sh                         |  2 +-\n test-fake-ssh.c                       | 30 ++++++++++++\n 27 files changed, 196 insertions(+), 69 deletions(-)\n create mode 100644 test-fake-ssh.c\n\nInterdiff vs v1:\n\n diff --git a/compat/mingw.c b/compat/mingw.c\n index 9e60335..f7acb7f 100644\n --- a/compat/mingw.c\n +++ b/compat/mingw.c\n @@ -2089,7 +2089,7 @@ static void setup_windows_environment()\n  \tchar *tmp = getenv(\"TMPDIR\");\n  \n  \t/* on Windows it is TMP and TEMP */\n -\tif (tmp) {\n +\tif (!tmp) {\n  \t\tif (!(tmp = getenv(\"TMP\")))\n  \t\t\ttmp = getenv(\"TEMP\");\n  \t\tif (tmp) {\n diff --git a/t/t0008-ignores.sh b/t/t0008-ignores.sh\n index 68749f5..89544dd 100755\n --- a/t/t0008-ignores.sh\n +++ b/t/t0008-ignores.sh\n @@ -5,13 +5,7 @@ test_description=check-ignore\n  . ./test-lib.sh\n  \n  init_vars () {\n -\t# On Windows, avoid using \"C:\" in the global-excludes paths.\n -\tif test_have_prereq MINGW\n -\tthen\n -\t\tglobal_excludes=\"global-excludes\"\n -\telse\n -\t\tglobal_excludes=\"$(pwd)/global-excludes\"\n -\tfi\n +\tglobal_excludes=\"global-excludes\"\n  }\n  \n  enable_global_excludes () {\n diff --git a/t/t0060-path-utils.sh b/t/t0060-path-utils.sh\n index 89d03e7..8532a02 100755\n --- a/t/t0060-path-utils.sh\n +++ b/t/t0060-path-utils.sh\n @@ -7,13 +7,6 @@ test_description='Test various path utilities'\n  \n  . ./test-lib.sh\n  \n -# On Windows, the root directory \"/\" is translated into a Windows directory.\n -# As it is not well-defined whether that Windows directory should end in a\n -# slash or not, let's test for that and adjust our expected longest ancestor\n -# length accordingly.\n -root_offset=0\n -case \"$(test-path-utils print_path /)\" in ?*/) root_offset=-1;; esac\n -\n  norm_path() {\n  \texpected=$(test-path-utils print_path \"$2\")\n  \ttest_expect_success $3 \"normalize path: $1 => $2\" \\\n @@ -43,12 +36,21 @@ if test $rootoff = 2; then\n  \trootoff=\t# we are on Unix\n  else\n  \trootoff=$(($rootoff-1))\n +\t# In MSYS2, the root directory \"/\" is translated into a Windows\n +\t# directory *with* trailing slash. Let's test for that and adjust\n +\t# our expected longest ancestor length accordingly.\n +\tcase \"$(test-path-utils print_path /)\" in\n +\t*/) rootslash=1;;\n +\t*) rootslash=0;;\n +\tesac\n  fi\n  \n  ancestor() {\n  \t# We do some math with the expected ancestor length.\n  \texpected=$3\n  \tif test -n \"$rootoff\" && test \"x$expected\" != x-1; then\n +\t\texpected=$(($expected-$rootslash))\n +\t\ttest $expected -lt 0 ||\n  \t\texpected=$(($expected+$rootoff))\n  \tfi\n  \ttest_expect_success \"longest ancestor: $1 $2 => $expected\" \\\n @@ -119,30 +121,30 @@ norm_path /d1/.../d2 /d1/.../d2\n  norm_path /d1/..././../d2 /d1/d2\n  \n  ancestor / / -1\n -ancestor /foo / $root_offset\n +ancestor /foo / 0\n  ancestor /foo /fo -1\n  ancestor /foo /foo -1\n  ancestor /foo /bar -1\n  ancestor /foo /foo/bar -1\n  ancestor /foo /foo:/bar -1\n -ancestor /foo /:/foo:/bar $root_offset\n -ancestor /foo /foo:/:/bar $root_offset\n -ancestor /foo /:/bar:/foo $root_offset\n -ancestor /foo/bar / $root_offset\n +ancestor /foo /:/foo:/bar 0\n +ancestor /foo /foo:/:/bar 0\n +ancestor /foo /:/bar:/foo 0\n +ancestor /foo/bar / 0\n  ancestor /foo/bar /fo -1\n -ancestor /foo/bar /foo $((4+$root_offset))\n +ancestor /foo/bar /foo 4\n  ancestor /foo/bar /foo/ba -1\n -ancestor /foo/bar /:/fo $root_offset\n -ancestor /foo/bar /foo:/foo/ba $((4+$root_offset))\n +ancestor /foo/bar /:/fo 0\n +ancestor /foo/bar /foo:/foo/ba 4\n  ancestor /foo/bar /bar -1\n  ancestor /foo/bar /fo -1\n -ancestor /foo/bar /foo:/bar $((4+$root_offset))\n -ancestor /foo/bar /:/foo:/bar $((4+$root_offset))\n -ancestor /foo/bar /foo:/:/bar $((4+$root_offset))\n -ancestor /foo/bar /:/bar:/fo $root_offset\n -ancestor /foo/bar /:/bar $root_offset\n -ancestor /foo/bar /foo $((4+$root_offset))\n -ancestor /foo/bar /foo:/bar $((4+$root_offset))\n +ancestor /foo/bar /foo:/bar 4\n +ancestor /foo/bar /:/foo:/bar 4\n +ancestor /foo/bar /foo:/:/bar 4\n +ancestor /foo/bar /:/bar:/fo 0\n +ancestor /foo/bar /:/bar 0\n +ancestor /foo/bar /foo 4\n +ancestor /foo/bar /foo:/bar 4\n  ancestor /foo/bar /bar -1\n  \n  test_expect_success 'strip_path_suffix' '\n diff --git a/t/t1508-at-combinations.sh b/t/t1508-at-combinations.sh\n index 1d9fd7b..c59d554 100755\n --- a/t/t1508-at-combinations.sh\n +++ b/t/t1508-at-combinations.sh\n @@ -29,22 +29,16 @@ fail() {\n  \t\"$@\" failure\n  }\n  \n -if test_have_prereq MINGW\n -then\n -\t# MSYS2 interprets `@/abc` to be a file list, and wants to substitute\n -\t# the Unix-y path with a Windows one (e.g. @C:\\msys64\\abc)\n -\tAT_SLASH=@//at-test\n -else\n -\tAT_SLASH=@/at-test\n -fi\n -\n  test_expect_success 'setup' '\n  \ttest_commit master-one &&\n  \ttest_commit master-two &&\n  \tgit checkout -b upstream-branch &&\n  \ttest_commit upstream-one &&\n  \ttest_commit upstream-two &&\n -\tgit checkout -b $AT_SLASH &&\n +\tif ! test_have_prereq MINGW\n +\tthen\n +\t\tgit checkout -b @/at-slash\n +\tfi &&\n  \tgit checkout -b @@/at-test &&\n  \tgit checkout -b @at-test &&\n  \tgit checkout -b old-branch &&\n @@ -73,7 +67,8 @@ check \"@{-1}@{u}@{1}\" commit master-one\n  check \"@\" commit new-two\n  check \"@@{u}\" ref refs/heads/upstream-branch\n  check \"@@/at-test\" ref refs/heads/@@/at-test\n -check \"$AT_SLASH\" ref refs/heads/@/at-test\n +test_have_prereq MINGW ||\n +check \"@/at-test\" ref refs/heads/@/at-test\n  check \"@at-test\" ref refs/heads/@at-test\n  nonsense \"@{u}@{-1}\"\n  nonsense \"@{0}@{0}\"\n diff --git a/t/t9100-git-svn-basic.sh b/t/t9100-git-svn-basic.sh\n index 8c74ffa..5b32a3b 100755\n --- a/t/t9100-git-svn-basic.sh\n +++ b/t/t9100-git-svn-basic.sh\n @@ -25,23 +25,12 @@ test_expect_success \\\n  \t(\n  \t\tcd import &&\n  \t\techo foo >foo &&\n -\t\tif test_have_prereq !MINGW\n -\t\tthen\n -\t\t\tln -s foo foo.link\n -\t\telse\n -\t\t\t# MSYS libsvn does not support symlinks, so always use cp, even if\n -\t\t\t# ln -s actually works\n -\t\t\tcp foo foo.link\n -\t\tfi\n +\t\tln -s foo foo.link\n  \t\tmkdir -p dir/a/b/c/d/e &&\n  \t\techo \"deep dir\" >dir/a/b/c/d/e/file &&\n  \t\tmkdir bar &&\n  \t\techo \"zzz\" >bar/zzz &&\n -\t\techo \"#!/bin/sh\" >exec.sh &&\n -\t\t{\n -\t\t\ttest_have_prereq !POSIXPERM ||\n -\t\t\tchmod +x exec.sh\n -\t\t} &&\n +\t\tprintf \"\" | write_script exec.sh &&\n  \t\tsvn_cmd import -m \"import for git svn\" . \"$svnrepo\" >/dev/null\n  \t) &&\n  \trm -rf import &&\n @@ -127,7 +116,7 @@ test_expect_success \"$name\" '\n  \n  \n  name='remove executable bit from a file'\n -test_expect_success !MINGW \"$name\" '\n +test_expect_success POSIXPERM \"$name\" '\n  \trm -f \"$GIT_DIR\"/index &&\n  \tgit checkout -f -b mybranch5 ${remotes_git_svn} &&\n  \tchmod -x exec.sh &&\n @@ -140,7 +129,7 @@ test_expect_success !MINGW \"$name\" '\n  \n  \n  name='add executable bit back file'\n -test_expect_success !MINGW \"$name\" '\n +test_expect_success POSIXPERM \"$name\" '\n  \tchmod +x exec.sh &&\n  \tgit update-index exec.sh &&\n  \tgit commit -m \"$name\" &&\n @@ -151,7 +140,7 @@ test_expect_success !MINGW \"$name\" '\n  \n  \n  name='executable file becomes a symlink to file'\n -test_expect_success !MINGW \"$name\" '\n +test_expect_success SYMLINKS \"$name\" '\n  \trm exec.sh &&\n  \tln -s file exec.sh &&\n  \tgit update-index exec.sh &&\n @@ -163,7 +152,8 @@ test_expect_success !MINGW \"$name\" '\n  \n  name='new symlink is added to a file that was also just made executable'\n  \n -test_expect_success !MINGW \"$name\" '\n +test_expect_success POSIXPERM,SYMLINKS \"$name\" '\n +\tchmod +x file &&\n  \tln -s file exec-2.sh &&\n  \tgit update-index --add file exec-2.sh &&\n  \tgit commit -m \"$name\" &&\n @@ -174,7 +164,7 @@ test_expect_success !MINGW \"$name\" '\n  \ttest -h \"$SVN_TREE\"/exec-2.sh'\n  \n  name='modify a symlink to become a file'\n -test_expect_success !MINGW \"$name\" '\n +test_expect_success POSIXPERM,SYMLINKS \"$name\" '\n  \techo git help >help &&\n  \trm exec-2.sh &&\n  \tcp help exec-2.sh &&\n @@ -190,7 +180,8 @@ test_expect_success !MINGW \"$name\" '\n  name=\"commit with UTF-8 message: locale: $GIT_SVN_LC_ALL\"\n  LC_ALL=\"$GIT_SVN_LC_ALL\"\n  export LC_ALL\n -test_expect_success !MINGW,UTF8 \"$name\" \"\n +# This test relies on the previous test, hence requires POSIXPERM,SYMLINKS\n +test_expect_success UTF8,POSIXPERM,SYMLINKS \"$name\" \"\n  \techo '# hello' >> exec-2.sh &&\n  \tgit update-index exec-2.sh &&\n  \tgit commit -m 'éï∏' &&\n @@ -223,7 +214,7 @@ tree d667270a1f7b109f5eb3aaea21ede14b56bfdd6e\n  tree 8f51f74cf0163afc9ad68a4b1537288c4558b5a4\n  EOF\n  \n -test_expect_success !MINGW \"$name\" \"test_cmp a expected\"\n +test_expect_success POSIXPERM,SYMLINKS \"$name\" \"test_cmp a expected\"\n  \n  test_expect_success 'exit if remote refs are ambigious' \"\n          git config --add svn-remote.svn.fetch \\\n diff --git a/t/t9118-git-svn-funky-branch-names.sh b/t/t9118-git-svn-funky-branch-names.sh\n index 49775a5..ecb1fed 100755\n --- a/t/t9118-git-svn-funky-branch-names.sh\n +++ b/t/t9118-git-svn-funky-branch-names.sh\n @@ -23,11 +23,11 @@ test_expect_success 'setup svnrepo' '\n  \t              \"$svnrepo/pr ject/branches/$scary_uri\" &&\n  \tsvn_cmd cp -m \"leading dot\" \"$svnrepo/pr ject/trunk\" \\\n  \t\t\t\"$svnrepo/pr ject/branches/.leading_dot\" &&\n -\t{\n -\t\ttest_have_prereq MINGW ||\n +\tif test_have_prereq !MINGW\n +\tthen\n  \t\tsvn_cmd cp -m \"trailing dot\" \"$svnrepo/pr ject/trunk\" \\\n  \t\t\t\"$svnrepo/pr ject/branches/trailing_dot.\"\n -\t} &&\n +\tfi &&\n  \tsvn_cmd cp -m \"trailing .lock\" \"$svnrepo/pr ject/trunk\" \\\n  \t\t\t\"$svnrepo/pr ject/branches/trailing_dotlock.lock\" &&\n  \tsvn_cmd cp -m \"reflog\" \"$svnrepo/pr ject/trunk\" \\\n @@ -48,10 +48,10 @@ test_expect_success 'test clone with funky branch names' '\n  \t\tgit rev-parse \"refs/remotes/origin/more%20fun%20plugin!\" &&\n  \t\tgit rev-parse \"refs/remotes/origin/$scary_ref\" &&\n  \t\tgit rev-parse \"refs/remotes/origin/%2Eleading_dot\" &&\n -\t\t{\n -\t\t\ttest_have_prereq MINGW ||\n +\t\tif test_have_prereq !MINGW\n +\t\tthen\n  \t\t\tgit rev-parse \"refs/remotes/origin/trailing_dot%2E\"\n -\t\t} &&\n +\t\tfi &&\n  \t\tgit rev-parse \"refs/remotes/origin/trailing_dotlock%2Elock\" &&\n  \t\tgit rev-parse \"refs/remotes/origin/$non_reflog\"\n  \t)\n diff --git a/t/t9124-git-svn-dcommit-auto-props.sh b/t/t9124-git-svn-dcommit-auto-props.sh\n index c851121..2be0805 100755\n --- a/t/t9124-git-svn-dcommit-auto-props.sh\n +++ b/t/t9124-git-svn-dcommit-auto-props.sh\n @@ -34,11 +34,7 @@ test_expect_success 'enable auto-props config' '\n  '\n  \n  test_expect_success 'add files matching auto-props' '\n -\techo \"#!$SHELL_PATH\" >exec1.sh &&\n -\t{\n -\t\ttest_have_prereq !POSIXPERM ||\n -\t\tchmod +x exec1.sh\n -\t} &&\n +\tprintf \"\" | write_script exec1.sh &&\n  \techo \"hello\" >hello.txt &&\n  \techo bar >bar &&\n  \tgit add exec1.sh hello.txt bar &&\n @@ -51,11 +47,7 @@ test_expect_success 'disable auto-props config' '\n  '\n  \n  test_expect_success 'add files matching disabled auto-props' '\n -\techo \"#$SHELL_PATH\" >exec2.sh &&\n -\t{\n -\t\ttest_have_prereq !POSIXPERM ||\n -\t\tchmod +x exec2.sh\n -\t} &&\n +\tprintf \"\" | write_script exec2.sh &&\n  \techo \"world\" >world.txt &&\n  \techo zot >zot &&\n  \tgit add exec2.sh world.txt zot &&\n @@ -71,10 +63,10 @@ test_expect_success 'check resulting svn repository' '\n  \tcd svnrepo &&\n  \n  \t# Check properties from first commit.\n -\t{\n -\t\ttest_have_prereq !POSIXPERM ||\n -\t\ttest \"x$(svn_cmd propget svn:executable exec1.sh)\" = \"x*\"\n -\t} &&\n +\tif test_have_prereq POSIXPERM\n +\tthen\n +\t\ttest -z \"$(svn_cmd propget svn:executable exec1.sh)\"\n +\tfi &&\n  \ttest \"x$(svn_cmd propget svn:mime-type exec1.sh)\" = \\\n  \t     \"xapplication/x-shellscript\" &&\n  \ttest \"x$(svn_cmd propget svn:mime-type hello.txt)\" = \"xtext/plain\" &&\n @@ -82,10 +74,10 @@ test_expect_success 'check resulting svn repository' '\n  \ttest \"x$(svn_cmd propget svn:mime-type bar)\" = \"x\" &&\n  \n  \t# Check properties from second commit.\n -\t{\n -\t\ttest_have_prereq !POSIXPERM ||\n -\t\ttest \"x$(svn_cmd propget svn:executable exec2.sh)\" = \"x*\"\n -\t} &&\n +\tif test_have_prereq POSIXPERM\n +\tthen\n +\t\ttest -z \"$(svn_cmd propget svn:executable exec2.sh)\"\n +\tfi &&\n  \ttest \"x$(svn_cmd propget svn:mime-type exec2.sh)\" = \"x\" &&\n  \ttest \"x$(svn_cmd propget svn:mime-type world.txt)\" = \"x\" &&\n  \ttest \"x$(svn_cmd propget svn:eol-style world.txt)\" = \"x\" &&\n diff --git a/t/t9130-git-svn-authors-file.sh b/t/t9130-git-svn-authors-file.sh\n index 4126481..d306b77 100755\n --- a/t/t9130-git-svn-authors-file.sh\n +++ b/t/t9130-git-svn-authors-file.sh\n @@ -91,7 +91,7 @@ test_expect_success 'fetch continues after authors-file is fixed' '\n  \t)\n  \t'\n  \n -test_expect_success !MINGW 'fresh clone with svn.authors-file in config' '\n +test_expect_success 'fresh clone with svn.authors-file in config' '\n  \t(\n  \t\trm -r \"$GIT_DIR\" &&\n  \t\ttest x = x\"$(git config svn.authorsfile)\" &&\n\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276811","messageId":"4473801e86c03bd48b79806029b61a3ba761d067.1453818790.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453818789.git.johannes.schindelin@gmx.de","subject":"[PATCH v2 01/19] mingw: let's use gettext with MSYS2","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-26T14:34:16Z","receivedAt":"2016-01-26T14:34:16Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"This solves two problems:\n\n- we now have proper localisation even on Windows\n\n- we sidestep the infamous \"BUG: your vsnprintf is broken (returned -1)\"\n  message when running \"git init\" (which otherwise prevents the entire\n  test suite from running) because libintl.h overrides vsnprintf() with\n  libintl_vsnprintf() [*1*]\n\nThe latter issue is rather crucial, as *no* test passes in Git for\nWindows without this fix.\n\nFootnote *1*: gettext_git=http://git.savannah.gnu.org/cgit/gettext.git\n$gettext_git/tree/gettext-runtime/intl/libgnuintl.in.h#n380\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n config.mak.uname | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/config.mak.uname b/config.mak.uname\nindex 4b2e1b8..6b25661 100644\n--- a/config.mak.uname\n+++ b/config.mak.uname\n@@ -560,7 +560,7 @@ else\n \t\tNO_R_TO_GCC_LINKER = YesPlease\n \t\tINTERNAL_QSORT = YesPlease\n \t\tHAVE_LIBCHARSET_H = YesPlease\n-\t\tNO_GETTEXT = YesPlease\n+\t\tNO_GETTEXT =\n \t\tUSE_LIBPCRE= YesPlease\n \t\tNO_CURL =\n \t\tUSE_NED_ALLOCATOR = YesPlease\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276810","messageId":"0511c0a72bddbdc6263ecd6fba2a8be23f59ff22.1453818790.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453818789.git.johannes.schindelin@gmx.de","subject":"[PATCH v2 02/19] mingw: do not trust MSYS2's MinGW gettext.sh","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-26T14:34:30Z","receivedAt":"2016-01-26T14:34:30Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"It does not quite work because it produces DOS line endings which the\nshell does not like at all.\n\nThis lets t0200-gettext-basic.sh, t0204-gettext-reencode-sanity.sh,\nt3406-rebase-message.sh, t3903-stash.sh, t7400-submodule-basic.sh,\nt7401-submodule-summary.sh, t7406-submodule-update.sh and\nt7407-submodule-foreach.sh pass in Git for Windows' SDK.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n config.mak.uname | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/config.mak.uname b/config.mak.uname\nindex 6b25661..d6f7980 100644\n--- a/config.mak.uname\n+++ b/config.mak.uname\n@@ -561,6 +561,7 @@ else\n \t\tINTERNAL_QSORT = YesPlease\n \t\tHAVE_LIBCHARSET_H = YesPlease\n \t\tNO_GETTEXT =\n+\t\tUSE_GETTEXT_SCHEME = fallthrough\n \t\tUSE_LIBPCRE= YesPlease\n \t\tNO_CURL =\n \t\tUSE_NED_ALLOCATOR = YesPlease\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276796","messageId":"1e53f292003d0e3ab81a5e26be63eb80bfd6cda7.1453818790.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453818789.git.johannes.schindelin@gmx.de","subject":"[PATCH v2 03/19] Git.pm: stop assuming that absolute paths start with a slash","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-26T14:34:35Z","receivedAt":"2016-01-26T14:34:35Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"On Windows, absolute paths never start with a slash, unless a POSIX\nemulation layer is used. The latter is the case for MSYS2's Perl that\nGit for Windows leverages. However, in the tests we also go through\nplain `git.exe`, which does *not* leverage the POSIX emulation layer,\nand therefore the paths we pass to Perl may actually be DOS-style paths\nsuch as C:/Program Files/Git.\n\nSo let's just use Perl's own way to test whether a given path is\nabsolute or not instead of home-brewing our own.\n\nThis patch partially fixes t7800 and t9700 when running in Git for\nWindows' SDK.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n perl/Git.pm | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/perl/Git.pm b/perl/Git.pm\nindex 19ef081..49eb88a 100644\n--- a/perl/Git.pm\n+++ b/perl/Git.pm\n@@ -188,7 +188,8 @@ sub repository {\n \t\t};\n \n \t\tif ($dir) {\n-\t\t\t$dir =~ m#^/# or $dir = $opts{Directory} . '/' . $dir;\n+\t\t\t_verify_require();\n+\t\t\tFile::Spec->file_name_is_absolute($dir) or $dir = $opts{Directory} . '/' . $dir;\n \t\t\t$opts{Repository} = abs_path($dir);\n \n \t\t\t# If --git-dir went ok, this shouldn't die either.\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276794","messageId":"8704a46662d0c2e9086c9a000cb8ead95594803c.1453818790.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453818789.git.johannes.schindelin@gmx.de","subject":"[PATCH v2 04/19] mingw: factor out Windows specific environment setup","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-26T14:34:38Z","receivedAt":"2016-01-26T14:34:38Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Karsten Blees <blees@dcon.de>\n\nWe will add more environment-related code to that new function\nin the next patch.\n\nSigned-off-by: Karsten Blees <blees@dcon.de>\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n compat/mingw.c | 30 +++++++++++++++++-------------\n 1 file changed, 17 insertions(+), 13 deletions(-)\n\ndiff --git a/compat/mingw.c b/compat/mingw.c\nindex 8437c9a..a12197e 100644\n--- a/compat/mingw.c\n+++ b/compat/mingw.c\n@@ -2040,6 +2040,22 @@ int xwcstoutf(char *utf, const wchar_t *wcs, size_t utflen)\n \treturn -1;\n }\n \n+static void setup_windows_environment()\n+{\n+\t/* on Windows it is TMP and TEMP */\n+\tif (!getenv(\"TMPDIR\")) {\n+\t\tconst char *tmp = getenv(\"TMP\");\n+\t\tif (!tmp)\n+\t\t\ttmp = getenv(\"TEMP\");\n+\t\tif (tmp)\n+\t\t\tsetenv(\"TMPDIR\", tmp, 1);\n+\t}\n+\n+\t/* simulate TERM to enable auto-color (see color.c) */\n+\tif (!getenv(\"TERM\"))\n+\t\tsetenv(\"TERM\", \"cygwin\", 1);\n+}\n+\n /*\n  * Disable MSVCRT command line wildcard expansion (__getmainargs called from\n  * mingw startup code, see init.c in mingw runtime).\n@@ -2118,19 +2134,7 @@ void mingw_startup()\n \tqsort(environ, i, sizeof(char*), compareenv);\n \n \t/* fix Windows specific environment settings */\n-\n-\t/* on Windows it is TMP and TEMP */\n-\tif (!mingw_getenv(\"TMPDIR\")) {\n-\t\tconst char *tmp = mingw_getenv(\"TMP\");\n-\t\tif (!tmp)\n-\t\t\ttmp = mingw_getenv(\"TEMP\");\n-\t\tif (tmp)\n-\t\t\tsetenv(\"TMPDIR\", tmp, 1);\n-\t}\n-\n-\t/* simulate TERM to enable auto-color (see color.c) */\n-\tif (!getenv(\"TERM\"))\n-\t\tsetenv(\"TERM\", \"cygwin\", 1);\n+\tsetup_windows_environment();\n \n \t/* initialize critical section for waitpid pinfo_t list */\n \tInitializeCriticalSection(&pinfo_cs);\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276797","messageId":"909b0a41341813e8352a285501839a7b5e8fcec9.1453818790.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453818789.git.johannes.schindelin@gmx.de","subject":"[PATCH v2 05/19] mingw: prepare the TMPDIR environment variable for shell scripts","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-26T14:34:43Z","receivedAt":"2016-01-26T14:34:43Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"When shell scripts access a $TMPDIR variable containing backslashes,\nthey will be mistaken for escape characters. Let's not let that happen\nby converting them to forward slashes.\n\nThis partially fixes t7800 with MSYS2.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n compat/mingw.c | 23 +++++++++++++++++++----\n 1 file changed, 19 insertions(+), 4 deletions(-)\n\ndiff --git a/compat/mingw.c b/compat/mingw.c\nindex a12197e..ba6bdb5 100644\n--- a/compat/mingw.c\n+++ b/compat/mingw.c\n@@ -2042,13 +2042,28 @@ int xwcstoutf(char *utf, const wchar_t *wcs, size_t utflen)\n \n static void setup_windows_environment()\n {\n+\tchar *tmp = getenv(\"TMPDIR\");\n+\n \t/* on Windows it is TMP and TEMP */\n-\tif (!getenv(\"TMPDIR\")) {\n-\t\tconst char *tmp = getenv(\"TMP\");\n-\t\tif (!tmp)\n+\tif (!tmp) {\n+\t\tif (!(tmp = getenv(\"TMP\")))\n \t\t\ttmp = getenv(\"TEMP\");\n-\t\tif (tmp)\n+\t\tif (tmp) {\n \t\t\tsetenv(\"TMPDIR\", tmp, 1);\n+\t\t\ttmp = getenv(\"TMPDIR\");\n+\t\t}\n+\t}\n+\n+\tif (tmp) {\n+\t\t/*\n+\t\t * Convert all dir separators to forward slashes,\n+\t\t * to help shell commands called from the Git\n+\t\t * executable (by not mistaking the dir separators\n+\t\t * for escape characters).\n+\t\t */\n+\t\tfor (; *tmp; tmp++)\n+\t\t\tif (*tmp == '\\\\')\n+\t\t\t\t*tmp = '/';\n \t}\n \n \t/* simulate TERM to enable auto-color (see color.c) */\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276795","messageId":"136a54ce9ad696a287b47bd2c9711c252a61f38c.1453818790.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453818789.git.johannes.schindelin@gmx.de","subject":"[PATCH v2 06/19] mingw: try to delete target directory before renaming","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-26T14:34:47Z","receivedAt":"2016-01-26T14:34:47Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: =?UTF-8?q?=EB=A7=88=EB=88=84=EC=97=98?= <nalla@hamal.uberspace.de>\n\nWhen the rename() function tries to move a directory it fails if the\ntarget directory exists. It should check if it can delete the (possibly\nempty) target directory and then try again to move the directory.\n\nThis partially fixes t9100-git-svn-basic.sh.\n\nSigned-off-by: 마누엘 <nalla@hamal.uberspace.de>\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n compat/mingw.c | 7 ++++++-\n 1 file changed, 6 insertions(+), 1 deletion(-)\n\ndiff --git a/compat/mingw.c b/compat/mingw.c\nindex ba6bdb5..11b905d 100644\n--- a/compat/mingw.c\n+++ b/compat/mingw.c\n@@ -1603,7 +1603,12 @@ repeat:\n \tif (gle == ERROR_ACCESS_DENIED &&\n \t    (attrs = GetFileAttributesW(wpnew)) != INVALID_FILE_ATTRIBUTES) {\n \t\tif (attrs & FILE_ATTRIBUTE_DIRECTORY) {\n-\t\t\terrno = EISDIR;\n+\t\t\tDWORD attrsold = GetFileAttributesW(wpold);\n+\t\t\tif (attrsold == INVALID_FILE_ATTRIBUTES ||\n+\t\t\t    !(attrsold & FILE_ATTRIBUTE_DIRECTORY))\n+\t\t\t\terrno = EISDIR;\n+\t\t\telse if (!_wrmdir(wpnew))\n+\t\t\t\tgoto repeat;\n \t\t\treturn -1;\n \t\t}\n \t\tif ((attrs & FILE_ATTRIBUTE_READONLY) &&\n-- \n2.7.0.windows.1.7.g55a05c8\n\n"},{"id":"276798","messageId":"f71e8b4ea2fbd1d4f28423d7ebab5f396c1db068.1453818790.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453818789.git.johannes.schindelin@gmx.de","subject":"[PATCH v2 07/19] mingw: let lstat() fail with errno == ENOTDIR when appropriate","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-26T14:34:52Z","receivedAt":"2016-01-26T14:34:52Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"POSIX semantics requires lstat() to fail with ENOTDIR when \"[a]\ncomponent of the path prefix names an existing file that is neither a\ndirectory nor a symbolic link to a directory\".\n\nSee http://pubs.opengroup.org/onlinepubs/9699919799/functions/lstat.html\n\nThis behavior is expected by t1404-update-ref-df-conflicts now.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n compat/mingw.c | 39 +++++++++++++++++++++++++++++++++++++++\n 1 file changed, 39 insertions(+)\n\ndiff --git a/compat/mingw.c b/compat/mingw.c\nindex 11b905d..f7acb7f 100644\n--- a/compat/mingw.c\n+++ b/compat/mingw.c\n@@ -454,6 +454,39 @@ static inline time_t filetime_to_time_t(const FILETIME *ft)\n \treturn (time_t)(filetime_to_hnsec(ft) / 10000000);\n }\n \n+/**\n+ * Verifies that safe_create_leading_directories() would succeed.\n+ */\n+static int has_valid_directory_prefix(wchar_t *wfilename)\n+{\n+\tint n = wcslen(wfilename);\n+\n+\twhile (n > 0) {\n+\t\twchar_t c = wfilename[--n];\n+\t\tDWORD attributes;\n+\n+\t\tif (!is_dir_sep(c))\n+\t\t\tcontinue;\n+\n+\t\twfilename[n] = L'\\0';\n+\t\tattributes = GetFileAttributesW(wfilename);\n+\t\twfilename[n] = c;\n+\t\tif (attributes == FILE_ATTRIBUTE_DIRECTORY ||\n+\t\t\t\tattributes == FILE_ATTRIBUTE_DEVICE)\n+\t\t\treturn 1;\n+\t\tif (attributes == INVALID_FILE_ATTRIBUTES)\n+\t\t\tswitch (GetLastError()) {\n+\t\t\tcase ERROR_PATH_NOT_FOUND:\n+\t\t\t\tcontinue;\n+\t\t\tcase ERROR_FILE_NOT_FOUND:\n+\t\t\t\t/* This implies parent directory exists. */\n+\t\t\t\treturn 1;\n+\t\t\t}\n+\t\treturn 0;\n+\t}\n+\treturn 1;\n+}\n+\n /* We keep the do_lstat code in a separate function to avoid recursion.\n  * When a path ends with a slash, the stat will fail with ENOENT. In\n  * this case, we strip the trailing slashes and stat again.\n@@ -514,6 +547,12 @@ static int do_lstat(int follow, const char *file_name, struct stat *buf)\n \tcase ERROR_NOT_ENOUGH_MEMORY:\n \t\terrno = ENOMEM;\n \t\tbreak;\n+\tcase ERROR_PATH_NOT_FOUND:\n+\t\tif (!has_valid_directory_prefix(wfilename)) {\n+\t\t\terrno = ENOTDIR;\n+\t\t\tbreak;\n+\t\t}\n+\t\t/* fallthru */\n \tdefault:\n \t\terrno = ENOENT;\n \t\tbreak;\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276805","messageId":"88657a291f8c0c2d5acdf88bcfeb32c87cf443c9.1453818790.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453818789.git.johannes.schindelin@gmx.de","subject":"[PATCH v2 08/19] mingw: fix t5601-clone.sh","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-26T14:34:57Z","receivedAt":"2016-01-26T14:34:57Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Since baaf233 (connect: improve check for plink to reduce false\npositives, 2015-04-26), t5601 writes out a `plink.exe` for testing that\nis actually a shell script. So the assumption that the `.exe` extension\nimplies that the file is *not* a shell script is now wrong.\n\nSince there was no love for the idea of allowing `.exe` files to be\nshell scripts on Windows, let's go the other way round: *make*\n`plink.exe` a real `.exe`.\n\nThis fixes t5601-clone.sh in Git for Windows' SDK.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n Makefile         |  1 +\n t/t5601-clone.sh | 18 ++++++++----------\n test-fake-ssh.c  | 30 ++++++++++++++++++++++++++++++\n 3 files changed, 39 insertions(+), 10 deletions(-)\n create mode 100644 test-fake-ssh.c\n\ndiff --git a/Makefile b/Makefile\nindex fc2f1ab..10566d6 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -583,6 +583,7 @@ TEST_PROGRAMS_NEED_X += test-delta\n TEST_PROGRAMS_NEED_X += test-dump-cache-tree\n TEST_PROGRAMS_NEED_X += test-dump-split-index\n TEST_PROGRAMS_NEED_X += test-dump-untracked-cache\n+TEST_PROGRAMS_NEED_X += test-fake-ssh\n TEST_PROGRAMS_NEED_X += test-genrandom\n TEST_PROGRAMS_NEED_X += test-hashmap\n TEST_PROGRAMS_NEED_X += test-index-version\ndiff --git a/t/t5601-clone.sh b/t/t5601-clone.sh\nindex 669ec9b..2f4272a 100755\n--- a/t/t5601-clone.sh\n+++ b/t/t5601-clone.sh\n@@ -4,6 +4,9 @@ test_description=clone\n \n . ./test-lib.sh\n \n+X=\n+! test_have_prereq MINGW || X=.exe\n+\n test_expect_success setup '\n \n \trm -fr .git &&\n@@ -305,14 +308,9 @@ test_expect_success 'clone checking out a tag' '\n \n setup_ssh_wrapper () {\n \ttest_expect_success 'setup ssh wrapper' '\n-\t\twrite_script \"$TRASH_DIRECTORY/ssh-wrapper\" <<-\\EOF &&\n-\t\techo >>\"$TRASH_DIRECTORY/ssh-output\" \"ssh: $*\" &&\n-\t\t# throw away all but the last argument, which should be the\n-\t\t# command\n-\t\twhile test $# -gt 1; do shift; done\n-\t\teval \"$1\"\n-\t\tEOF\n-\t\tGIT_SSH=\"$TRASH_DIRECTORY/ssh-wrapper\" &&\n+\t\tcp \"$GIT_BUILD_DIR/test-fake-ssh$X\" \\\n+\t\t\t\"$TRASH_DIRECTORY/ssh-wrapper$X\" &&\n+\t\tGIT_SSH=\"$TRASH_DIRECTORY/ssh-wrapper$X\" &&\n \t\texport GIT_SSH &&\n \t\texport TRASH_DIRECTORY &&\n \t\t>\"$TRASH_DIRECTORY\"/ssh-output\n@@ -320,8 +318,8 @@ setup_ssh_wrapper () {\n }\n \n copy_ssh_wrapper_as () {\n-\tcp \"$TRASH_DIRECTORY/ssh-wrapper\" \"$1\" &&\n-\tGIT_SSH=\"$1\" &&\n+\tcp \"$TRASH_DIRECTORY/ssh-wrapper$X\" \"${1%$X}$X\" &&\n+\tGIT_SSH=\"${1%$X}$X\" &&\n \texport GIT_SSH\n }\n \ndiff --git a/test-fake-ssh.c b/test-fake-ssh.c\nnew file mode 100644\nindex 0000000..980de21\n--- /dev/null\n+++ b/test-fake-ssh.c\n@@ -0,0 +1,30 @@\n+#include \"git-compat-util.h\"\n+#include \"run-command.h\"\n+#include \"strbuf.h\"\n+\n+int main(int argc, char **argv)\n+{\n+\tconst char *trash_directory = getenv(\"TRASH_DIRECTORY\");\n+\tstruct strbuf buf = STRBUF_INIT;\n+\tFILE *f;\n+\tint i;\n+\tconst char *child_argv[] = { NULL, NULL };\n+\n+\t/* First, print all parameters into $TRASH_DIRECTORY/ssh-output */\n+\tif (!trash_directory)\n+\t\tdie(\"Need a TRASH_DIRECTORY!\");\n+\tstrbuf_addf(&buf, \"%s/ssh-output\", trash_directory);\n+\tf = fopen(buf.buf, \"w\");\n+\tif (!f)\n+\t\tdie(\"Could not write to %s\", buf.buf);\n+\tfor (i = 0; i < argc; i++)\n+\t\tfprintf(f, \"%s%s\", i > 0 ? \" \" : \"\", i > 0 ? argv[i] : \"ssh:\");\n+\tfprintf(f, \"\\n\");\n+\tfclose(f);\n+\n+\t/* Now, evaluate the *last* parameter */\n+\tif (argc < 2)\n+\t\treturn 0;\n+\tchild_argv[0] = argv[argc - 1];\n+\treturn run_command_v_opt(child_argv, RUN_USING_SHELL);\n+}\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276800","messageId":"79b66a84a41557be3c37c693de1f6b1f498a8c04.1453818790.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453818789.git.johannes.schindelin@gmx.de","subject":"[PATCH v2 09/19] mingw: accomodate t0060-path-utils for MSYS2","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-26T14:35:02Z","receivedAt":"2016-01-26T14:35:02Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"On Windows, there are no POSIX paths, only Windows ones (an absolute\nWindows path looks like \"C:\\Program Files\\Git\\ReleaseNotes.html\", under\nmost circumstances, forward slashes are also allowed and synonymous to\nbackslashes).\n\nSo when a POSIX shell (such as MSYS2's Bash, which is used by Git for\nWindows to execute all those shell scripts that are part of Git) passes\na POSIX path to test-path-utils.exe (which is not POSIX-aware), the path\nis translated into a Windows path. For example, /etc/profile becomes\nC:/Program Files/Git/etc/profile.\n\nThis path translation poses a problem when passing the root directory as\nparameter to test-path-utils.exe, as it is not well defined whether the\ntranslated root directory should end in a slash or not. MSys1 stripped\nthe trailing slash, but MSYS2 does not.\n\nOriginally, the Git for Windows project patched MSYS2's runtime to\naccomodate Git's regression test, but we really should do it the other\nway round.\n\nTo work with both of MSys1's and MSYS2's behaviors, we simply test what\nthe current system does in the beginning of t0060-path-utils.sh and then\nadjust the expected longest ancestor length accordingly.\n\nIt looks quite a bit tricky what we actually do in this patch: first, we\nadjust the expected length for the trailing slash we did not originally\nexpect (subtracting one). So far, so good.\n\nBut now comes the part where things work in a surprising way: when the\nexpected length was 0, the prefix to match is the root directory. If the\nroot directory is converted into a path with a trailing slash, however,\nwe know that the logic in longest_ancestor_length() cannot match: to\navoid partial matches of the last directory component, it verifies that\nthe character after the matching prefix is a slash (but because the\nslash was part of the matching prefix, the next character cannot be a\nslash). So the return value is -1. Alas, this is exactly what the\nexpected length is after subtracting the value of $rootslash! So we skip\nadding the $rootoff value in that case (and only in that case).\n\nDirectories other than the root directory are handled fine (as they are\nspecified without a trailing slash, something not possible for the root\ndirectory, and MSYS2 converts them into Windows paths that also lack\ntrailing slashes), therefore we do not need any more special handling.\n\nThanks to Ray Donnelly for his patient help with this issue.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t0060-path-utils.sh | 9 +++++++++\n 1 file changed, 9 insertions(+)\n\ndiff --git a/t/t0060-path-utils.sh b/t/t0060-path-utils.sh\nindex f0152a7..8532a02 100755\n--- a/t/t0060-path-utils.sh\n+++ b/t/t0060-path-utils.sh\n@@ -36,12 +36,21 @@ if test $rootoff = 2; then\n \trootoff=\t# we are on Unix\n else\n \trootoff=$(($rootoff-1))\n+\t# In MSYS2, the root directory \"/\" is translated into a Windows\n+\t# directory *with* trailing slash. Let's test for that and adjust\n+\t# our expected longest ancestor length accordingly.\n+\tcase \"$(test-path-utils print_path /)\" in\n+\t*/) rootslash=1;;\n+\t*) rootslash=0;;\n+\tesac\n fi\n \n ancestor() {\n \t# We do some math with the expected ancestor length.\n \texpected=$3\n \tif test -n \"$rootoff\" && test \"x$expected\" != x-1; then\n+\t\texpected=$(($expected-$rootslash))\n+\t\ttest $expected -lt 0 ||\n \t\texpected=$(($expected+$rootoff))\n \tfi\n \ttest_expect_success \"longest ancestor: $1 $2 => $expected\" \\\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276799","messageId":"5e9685e6bf906f99ae9cf551f55a12f5853137d6.1453818790.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453818789.git.johannes.schindelin@gmx.de","subject":"[PATCH v2 10/19] mingw: disable mkfifo-based tests","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-26T14:35:06Z","receivedAt":"2016-01-26T14:35:06Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"MSYS2 (the POSIX emulation layer used by Git for Windows' Bash) actually\nhas a working mkfifo. The only problem is that it is only emulating\nnamed pipes through the MSYS2 runtime; The Win32 API has no idea about\nnamed pipes, hence the Git executable cannot access those pipes either.\n\nThe symptom is that Git fails with a '<name>: No such file or directory'\nbecause MSYS2 emulates named pipes through special-crafted '.lnk' files.\n\nThe solution is to tell the test suite explicitly that we cannot use\nnamed pipes when we want to test on Windows.\n\nThis lets t4056-diff-order.sh, t9010-svn-fe.sh and t9300-fast-import.sh\npass.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/test-lib.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex bd4b02e..1470c8d 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -998,7 +998,7 @@ test_i18ngrep () {\n test_lazy_prereq PIPE '\n \t# test whether the filesystem supports FIFOs\n \tcase $(uname -s) in\n-\tCYGWIN*)\n+\tCYGWIN*|MINGW*)\n \t\tfalse\n \t\t;;\n \t*)\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276802","messageId":"0717fe3c7788ae2441cdf2e8ca8aeda708e8d300.1453818790.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453818789.git.johannes.schindelin@gmx.de","subject":"[PATCH v2 11/19] tests: turn off git-daemon tests if FIFOs are not available","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-26T14:35:09Z","receivedAt":"2016-01-26T14:35:09Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"The Git daemon tests create a FIFO first thing and will hang if said\nFIFO is not available.\n\nThis is a problem with Git for Windows, where `mkfifo` is an MSYS2\nprogram that leverages MSYS2's POSIX emulation layer, but\n`git-daemon.exe` is a MINGW program that has not the first clue about\nthat POSIX emulation layer and therefore blinks twice when it sees\nMSYS2's emulated FIFOs and then just stares into space.\n\nThis lets t5570-git-daemon.sh and t5811-proto-disable-git.sh pass.\n\nSigned-off-by: Stepan Kasal <kasal@ucw.cz>\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/lib-git-daemon.sh | 5 +++++\n 1 file changed, 5 insertions(+)\n\ndiff --git a/t/lib-git-daemon.sh b/t/lib-git-daemon.sh\nindex bc4b341..9b1271c 100644\n--- a/t/lib-git-daemon.sh\n+++ b/t/lib-git-daemon.sh\n@@ -23,6 +23,11 @@ then\n \ttest_done\n fi\n \n+if ! test_have_prereq PIPE\n+then\n+\ttest_skip_or_die $GIT_TEST_GIT_DAEMON \"file system does not support FIFOs\"\n+fi\n+\n LIB_GIT_DAEMON_PORT=${LIB_GIT_DAEMON_PORT-${this_test#t}}\n \n GIT_DAEMON_PID=\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276812","messageId":"5aea04c3f348e3891a01b6908bf6562a26f9dd1e.1453818790.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453818789.git.johannes.schindelin@gmx.de","subject":"[PATCH v2 12/19] mingw: skip test in t1508 that fails due to path conversion","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-26T14:35:14Z","receivedAt":"2016-01-26T14:35:14Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"In Git for Windows, the MSYS2 POSIX emulation layer used by the Bash\nconverts command-line arguments that looks like they refer to a POSIX\npath containing a file list (i.e. @<absolute-path>) into a Windows path\nequivalent when calling non-MSYS2 executables, such as git.exe.\n\nLet's just skip the test that uses the parameter `@/at-test` that\nconfuses the MSYS2 runtime.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t1508-at-combinations.sh | 6 +++++-\n 1 file changed, 5 insertions(+), 1 deletion(-)\n\ndiff --git a/t/t1508-at-combinations.sh b/t/t1508-at-combinations.sh\nindex 078e119..c59d554 100755\n--- a/t/t1508-at-combinations.sh\n+++ b/t/t1508-at-combinations.sh\n@@ -35,7 +35,10 @@ test_expect_success 'setup' '\n \tgit checkout -b upstream-branch &&\n \ttest_commit upstream-one &&\n \ttest_commit upstream-two &&\n-\tgit checkout -b @/at-test &&\n+\tif ! test_have_prereq MINGW\n+\tthen\n+\t\tgit checkout -b @/at-slash\n+\tfi &&\n \tgit checkout -b @@/at-test &&\n \tgit checkout -b @at-test &&\n \tgit checkout -b old-branch &&\n@@ -64,6 +67,7 @@ check \"@{-1}@{u}@{1}\" commit master-one\n check \"@\" commit new-two\n check \"@@{u}\" ref refs/heads/upstream-branch\n check \"@@/at-test\" ref refs/heads/@@/at-test\n+test_have_prereq MINGW ||\n check \"@/at-test\" ref refs/heads/@/at-test\n check \"@at-test\" ref refs/heads/@at-test\n nonsense \"@{u}@{-1}\"\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276801","messageId":"d15d51987ac6a8aca30caa6440eb3e9d6aa25524.1453818790.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453818789.git.johannes.schindelin@gmx.de","subject":"[PATCH v2 13/19] mingw: fix t9700's assumption about directory separators","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-26T14:35:18Z","receivedAt":"2016-01-26T14:35:18Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"This test assumed that there is only one directory separator (the\nforward slash), not two equivalent directory separators.\nHowever, on Windows, the back slash and the forward slash *are*\nequivalent.\n\nLet's paper over this issue by converting the backward slashes to\nforward ones in the test that fails with MSYS2 otherwise.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t9700/test.pl | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t9700/test.pl b/t/t9700/test.pl\nindex 1140767..7e8c40b 100755\n--- a/t/t9700/test.pl\n+++ b/t/t9700/test.pl\n@@ -33,7 +33,7 @@ is($r->config_int(\"test.int\"), 2048, \"config_int: integer\");\n is($r->config_int(\"test.nonexistent\"), undef, \"config_int: nonexistent\");\n ok($r->config_bool(\"test.booltrue\"), \"config_bool: true\");\n ok(!$r->config_bool(\"test.boolfalse\"), \"config_bool: false\");\n-is($r->config_path(\"test.path\"), $r->config(\"test.pathexpanded\"),\n+is($r->config_path(\"test.path\") =~ s/\\\\/\\//gr, $r->config(\"test.pathexpanded\"),\n    \"config_path: ~/foo expansion\");\n is_deeply([$r->config_path(\"test.pathmulti\")], [\"foo\", \"bar\"],\n    \"config_path: multiple values\");\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276804","messageId":"f273fbbaaaaa8340626e879665d538c13b8e3fcd.1453818790.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453818789.git.johannes.schindelin@gmx.de","subject":"[PATCH v2 14/19] mingw: work around pwd issues in the tests","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-26T14:35:21Z","receivedAt":"2016-01-26T14:35:21Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"In Git for Windows' SDK, the tests are run using a Bash that relies on\nthe POSIX emulation layer MSYS2 (itself a friendly fork of Cygwin). As\nsuch, paths in tests can be POSIX paths. As soon as those paths are\npassed to git.exe (which does *not* use the POSIX emulation layer),\nthose paths are converted into Windows paths, though. This happens\nfor command-line parameters, but not when reading, say, config variables.\n\nTo help with that, the `pwd` command is overridden to return the Windows\npath of the current working directory when testing Git on Windows.\n\nHowever, when talking to anything using the POSIX emulation layer, it is\nreally much better to use POSIX paths because Windows paths contain a\ncolon after the drive letter that will easily be mistaken for the common\nseparator in path lists.\n\nSo let's just use the $PWD variable when the POSIX path is needed.\n\nThis lets t7800-difftool.sh, t9400-git-cvsserver-server.sh,\nt9402-git-cvsserver-refs.sh and t9401-git-cvsserver-crlf.sh pass in Git\nfor Windows' SDK.\n\nNote: the cvsserver tests require not only the `cvs` package (install\nit into Git for Windows' SDK via `pacman -S cvs`) but also the Perl\nSQLite bindings (install them into Git for Windows' SDK via\n`cpan DBD::SQLite`).\n\nThis patch is based on earlier work by 마누엘 and Karsten Blees.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t7800-difftool.sh             | 14 +++++++-------\n t/t9400-git-cvsserver-server.sh |  6 +++---\n t/t9401-git-cvsserver-crlf.sh   |  6 +++---\n t/t9402-git-cvsserver-refs.sh   |  6 +++---\n 4 files changed, 16 insertions(+), 16 deletions(-)\n\ndiff --git a/t/t7800-difftool.sh b/t/t7800-difftool.sh\nindex ec8bc8c..4e713f7 100755\n--- a/t/t7800-difftool.sh\n+++ b/t/t7800-difftool.sh\n@@ -430,11 +430,11 @@ EOF\n test_expect_success PERL,SYMLINKS 'difftool --dir-diff --symlink without unstaged changes' '\n \tcat >expect <<-EOF &&\n \tfile\n-\t$(pwd)/file\n+\t$PWD/file\n \tfile2\n-\t$(pwd)/file2\n+\t$PWD/file2\n \tsub/sub\n-\t$(pwd)/sub/sub\n+\t$PWD/sub/sub\n \tEOF\n \tgit difftool --dir-diff --symlink \\\n \t\t--extcmd \"./.git/CHECK_SYMLINKS\" branch HEAD &&\n@@ -448,14 +448,14 @@ EOF\n run_dir_diff_test 'difftool --dir-diff syncs worktree with unstaged change' '\n \ttest_when_finished git reset --hard &&\n \techo \"orig content\" >file &&\n-\tgit difftool -d $symlinks --extcmd \"$(pwd)/modify-right-file\" branch &&\n+\tgit difftool -d $symlinks --extcmd \"$PWD/modify-right-file\" branch &&\n \techo \"new content\" >expect &&\n \ttest_cmp expect file\n '\n \n run_dir_diff_test 'difftool --dir-diff syncs worktree without unstaged change' '\n \ttest_when_finished git reset --hard &&\n-\tgit difftool -d $symlinks --extcmd \"$(pwd)/modify-right-file\" branch &&\n+\tgit difftool -d $symlinks --extcmd \"$PWD/modify-right-file\" branch &&\n \techo \"new content\" >expect &&\n \ttest_cmp expect file\n '\n@@ -466,7 +466,7 @@ EOF\n \n test_expect_success PERL 'difftool --no-symlinks does not overwrite working tree file ' '\n \techo \"orig content\" >file &&\n-\tgit difftool --dir-diff --no-symlinks --extcmd \"$(pwd)/modify-file\" branch &&\n+\tgit difftool --dir-diff --no-symlinks --extcmd \"$PWD/modify-file\" branch &&\n \techo \"new content\" >expect &&\n \ttest_cmp expect file\n '\n@@ -482,7 +482,7 @@ test_expect_success PERL 'difftool --no-symlinks detects conflict ' '\n \t\tTMPDIR=$TRASH_DIRECTORY &&\n \t\texport TMPDIR &&\n \t\techo \"orig content\" >file &&\n-\t\ttest_must_fail git difftool --dir-diff --no-symlinks --extcmd \"$(pwd)/modify-both-files\" branch &&\n+\t\ttest_must_fail git difftool --dir-diff --no-symlinks --extcmd \"$PWD/modify-both-files\" branch &&\n \t\techo \"wt content\" >expect &&\n \t\ttest_cmp expect file &&\n \t\techo \"tmp content\" >expect &&\ndiff --git a/t/t9400-git-cvsserver-server.sh b/t/t9400-git-cvsserver-server.sh\nindex 6146c3f..d708cbf 100755\n--- a/t/t9400-git-cvsserver-server.sh\n+++ b/t/t9400-git-cvsserver-server.sh\n@@ -25,11 +25,11 @@ perl -e 'use DBI; use DBD::SQLite' >/dev/null 2>&1 || {\n     test_done\n }\n \n-WORKDIR=$(pwd)\n-SERVERDIR=$(pwd)/gitcvs.git\n+WORKDIR=$PWD\n+SERVERDIR=$PWD/gitcvs.git\n git_config=\"$SERVERDIR/config\"\n CVSROOT=\":fork:$SERVERDIR\"\n-CVSWORK=\"$(pwd)/cvswork\"\n+CVSWORK=\"$PWD/cvswork\"\n CVS_SERVER=git-cvsserver\n export CVSROOT CVS_SERVER\n \ndiff --git a/t/t9401-git-cvsserver-crlf.sh b/t/t9401-git-cvsserver-crlf.sh\nindex 5a4ed28..f324b9f 100755\n--- a/t/t9401-git-cvsserver-crlf.sh\n+++ b/t/t9401-git-cvsserver-crlf.sh\n@@ -74,11 +74,11 @@ perl -e 'use DBI; use DBD::SQLite' >/dev/null 2>&1 || {\n }\n \n unset GIT_DIR GIT_CONFIG\n-WORKDIR=$(pwd)\n-SERVERDIR=$(pwd)/gitcvs.git\n+WORKDIR=$PWD\n+SERVERDIR=$PWD/gitcvs.git\n git_config=\"$SERVERDIR/config\"\n CVSROOT=\":fork:$SERVERDIR\"\n-CVSWORK=\"$(pwd)/cvswork\"\n+CVSWORK=\"$PWD/cvswork\"\n CVS_SERVER=git-cvsserver\n export CVSROOT CVS_SERVER\n \ndiff --git a/t/t9402-git-cvsserver-refs.sh b/t/t9402-git-cvsserver-refs.sh\nindex d00df08..6d2d3c8 100755\n--- a/t/t9402-git-cvsserver-refs.sh\n+++ b/t/t9402-git-cvsserver-refs.sh\n@@ -82,11 +82,11 @@ perl -e 'use DBI; use DBD::SQLite' >/dev/null 2>&1 || {\n }\n \n unset GIT_DIR GIT_CONFIG\n-WORKDIR=$(pwd)\n-SERVERDIR=$(pwd)/gitcvs.git\n+WORKDIR=$PWD\n+SERVERDIR=$PWD/gitcvs.git\n git_config=\"$SERVERDIR/config\"\n CVSROOT=\":fork:$SERVERDIR\"\n-CVSWORK=\"$(pwd)/cvswork\"\n+CVSWORK=\"$PWD/cvswork\"\n CVS_SERVER=git-cvsserver\n export CVSROOT CVS_SERVER\n \n-- \n2.7.0.windows.1.7.g55a05c8\n\n"},{"id":"276803","messageId":"1d1dd22a4441f31b88531493001a5042710bf106.1453818790.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453818789.git.johannes.schindelin@gmx.de","subject":"[PATCH v2 15/19] Avoid absolute path in t0008","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-26T14:35:26Z","receivedAt":"2016-01-26T14:35:26Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Pat Thoyts <patthoyts@users.sourceforge.net>\n\nThe colon is used by check-ignore to separate paths from other output\nvalues. If we use an absolute path, however, on Windows it will be\nconverted into a Windows path that very much contains a colon.\n\nIt is actually not at all necessary to make the path of the global\nexcludes absolute, so let's just not even do that.\n\nBased on suggestions by Karsten Blees and Junio Hamano.\n\nSuggested-by: Karsten Blees <karsten.blees@gmail.com>\nSigned-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t0008-ignores.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t0008-ignores.sh b/t/t0008-ignores.sh\nindex 4ef5ed4..89544dd 100755\n--- a/t/t0008-ignores.sh\n+++ b/t/t0008-ignores.sh\n@@ -5,7 +5,7 @@ test_description=check-ignore\n . ./test-lib.sh\n \n init_vars () {\n-\tglobal_excludes=\"$(pwd)/global-excludes\"\n+\tglobal_excludes=\"global-excludes\"\n }\n \n enable_global_excludes () {\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276806","messageId":"49a0657c42cba813c4cf0c17169b28031c6d4312.1453818790.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453818789.git.johannes.schindelin@gmx.de","subject":"[PATCH v2 16/19] mingw: mark t9100's test cases with appropriate prereqs","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-26T14:35:30Z","receivedAt":"2016-01-26T14:35:30Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Many a test requires either POSIXPERM (to change the executable bit) or\nSYMLINKS, and neither are available on Windows.\n\nThis lets t9100-git-svn-basic.sh pass in Git for Windows' SDK.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t9100-git-svn-basic.sh | 18 +++++++++---------\n 1 file changed, 9 insertions(+), 9 deletions(-)\n\ndiff --git a/t/t9100-git-svn-basic.sh b/t/t9100-git-svn-basic.sh\nindex 258d9b8..5b32a3b 100755\n--- a/t/t9100-git-svn-basic.sh\n+++ b/t/t9100-git-svn-basic.sh\n@@ -30,8 +30,7 @@ test_expect_success \\\n \t\techo \"deep dir\" >dir/a/b/c/d/e/file &&\n \t\tmkdir bar &&\n \t\techo \"zzz\" >bar/zzz &&\n-\t\techo \"#!/bin/sh\" >exec.sh &&\n-\t\tchmod +x exec.sh &&\n+\t\tprintf \"\" | write_script exec.sh &&\n \t\tsvn_cmd import -m \"import for git svn\" . \"$svnrepo\" >/dev/null\n \t) &&\n \trm -rf import &&\n@@ -117,7 +116,7 @@ test_expect_success \"$name\" '\n \n \n name='remove executable bit from a file'\n-test_expect_success \"$name\" '\n+test_expect_success POSIXPERM \"$name\" '\n \trm -f \"$GIT_DIR\"/index &&\n \tgit checkout -f -b mybranch5 ${remotes_git_svn} &&\n \tchmod -x exec.sh &&\n@@ -130,7 +129,7 @@ test_expect_success \"$name\" '\n \n \n name='add executable bit back file'\n-test_expect_success \"$name\" '\n+test_expect_success POSIXPERM \"$name\" '\n \tchmod +x exec.sh &&\n \tgit update-index exec.sh &&\n \tgit commit -m \"$name\" &&\n@@ -141,7 +140,7 @@ test_expect_success \"$name\" '\n \n \n name='executable file becomes a symlink to file'\n-test_expect_success \"$name\" '\n+test_expect_success SYMLINKS \"$name\" '\n \trm exec.sh &&\n \tln -s file exec.sh &&\n \tgit update-index exec.sh &&\n@@ -153,7 +152,7 @@ test_expect_success \"$name\" '\n \n name='new symlink is added to a file that was also just made executable'\n \n-test_expect_success \"$name\" '\n+test_expect_success POSIXPERM,SYMLINKS \"$name\" '\n \tchmod +x file &&\n \tln -s file exec-2.sh &&\n \tgit update-index --add file exec-2.sh &&\n@@ -165,7 +164,7 @@ test_expect_success \"$name\" '\n \ttest -h \"$SVN_TREE\"/exec-2.sh'\n \n name='modify a symlink to become a file'\n-test_expect_success \"$name\" '\n+test_expect_success POSIXPERM,SYMLINKS \"$name\" '\n \techo git help >help &&\n \trm exec-2.sh &&\n \tcp help exec-2.sh &&\n@@ -181,7 +180,8 @@ test_expect_success \"$name\" '\n name=\"commit with UTF-8 message: locale: $GIT_SVN_LC_ALL\"\n LC_ALL=\"$GIT_SVN_LC_ALL\"\n export LC_ALL\n-test_expect_success UTF8 \"$name\" \"\n+# This test relies on the previous test, hence requires POSIXPERM,SYMLINKS\n+test_expect_success UTF8,POSIXPERM,SYMLINKS \"$name\" \"\n \techo '# hello' >> exec-2.sh &&\n \tgit update-index exec-2.sh &&\n \tgit commit -m '???????' &&\n@@ -214,7 +214,7 @@ tree d667270a1f7b109f5eb3aaea21ede14b56bfdd6e\n tree 8f51f74cf0163afc9ad68a4b1537288c4558b5a4\n EOF\n \n-test_expect_success \"$name\" \"test_cmp a expected\"\n+test_expect_success POSIXPERM,SYMLINKS \"$name\" \"test_cmp a expected\"\n \n test_expect_success 'exit if remote refs are ambigious' \"\n         git config --add svn-remote.svn.fetch \\\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276808","messageId":"53b4d33044a56b94837bba27441cb8467d1ef3ad.1453818790.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453818789.git.johannes.schindelin@gmx.de","subject":"[PATCH v2 17/19] mingw: avoid illegal filename in t9118","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-26T14:35:34Z","receivedAt":"2016-01-26T14:35:34Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"On Windows' file systems, file names with trailing dots are forbidden.\nThe POSIX emulation layer used by Git for Windows' Subversion emulates\nthose file names, therefore the test adding the file would actually\nsucceed, but when we would ask git.exe (which does not leverage the\nPOSIX emulation layer) to check out the tree, it would fail.\n\nLet's just guard the test using a filename that is illegal on Windows\nby the MINGW prereq.\n\nThis lets t9118-git-svn-funky-branch-names.sh pass in Git for Windows'\nSDK.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t9118-git-svn-funky-branch-names.sh | 12 +++++++++---\n 1 file changed, 9 insertions(+), 3 deletions(-)\n\ndiff --git a/t/t9118-git-svn-funky-branch-names.sh b/t/t9118-git-svn-funky-branch-names.sh\nindex a221915..ecb1fed 100755\n--- a/t/t9118-git-svn-funky-branch-names.sh\n+++ b/t/t9118-git-svn-funky-branch-names.sh\n@@ -23,8 +23,11 @@ test_expect_success 'setup svnrepo' '\n \t              \"$svnrepo/pr ject/branches/$scary_uri\" &&\n \tsvn_cmd cp -m \"leading dot\" \"$svnrepo/pr ject/trunk\" \\\n \t\t\t\"$svnrepo/pr ject/branches/.leading_dot\" &&\n-\tsvn_cmd cp -m \"trailing dot\" \"$svnrepo/pr ject/trunk\" \\\n-\t\t\t\"$svnrepo/pr ject/branches/trailing_dot.\" &&\n+\tif test_have_prereq !MINGW\n+\tthen\n+\t\tsvn_cmd cp -m \"trailing dot\" \"$svnrepo/pr ject/trunk\" \\\n+\t\t\t\"$svnrepo/pr ject/branches/trailing_dot.\"\n+\tfi &&\n \tsvn_cmd cp -m \"trailing .lock\" \"$svnrepo/pr ject/trunk\" \\\n \t\t\t\"$svnrepo/pr ject/branches/trailing_dotlock.lock\" &&\n \tsvn_cmd cp -m \"reflog\" \"$svnrepo/pr ject/trunk\" \\\n@@ -45,7 +48,10 @@ test_expect_success 'test clone with funky branch names' '\n \t\tgit rev-parse \"refs/remotes/origin/more%20fun%20plugin!\" &&\n \t\tgit rev-parse \"refs/remotes/origin/$scary_ref\" &&\n \t\tgit rev-parse \"refs/remotes/origin/%2Eleading_dot\" &&\n-\t\tgit rev-parse \"refs/remotes/origin/trailing_dot%2E\" &&\n+\t\tif test_have_prereq !MINGW\n+\t\tthen\n+\t\t\tgit rev-parse \"refs/remotes/origin/trailing_dot%2E\"\n+\t\tfi &&\n \t\tgit rev-parse \"refs/remotes/origin/trailing_dotlock%2Elock\" &&\n \t\tgit rev-parse \"refs/remotes/origin/$non_reflog\"\n \t)\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276809","messageId":"4c38596ae3fdcc5906dba49521084fe2b1a6888d.1453818790.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453818789.git.johannes.schindelin@gmx.de","subject":"[PATCH v2 18/19] mingw: handle the missing POSIXPERM prereq in t9124","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-26T14:35:38Z","receivedAt":"2016-01-26T14:35:38Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"On Windows, the permission system works completely differently than\nexpected by some of the tests. So let's make sure that we do not test\nPOSIX functionality on Windows.\n\nThis lets t9124-git-svn-dcommit-auto-props.sh pass in Git for Windows'\nSDK.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t9124-git-svn-dcommit-auto-props.sh | 16 ++++++++++------\n 1 file changed, 10 insertions(+), 6 deletions(-)\n\ndiff --git a/t/t9124-git-svn-dcommit-auto-props.sh b/t/t9124-git-svn-dcommit-auto-props.sh\nindex aa841e1..2be0805 100755\n--- a/t/t9124-git-svn-dcommit-auto-props.sh\n+++ b/t/t9124-git-svn-dcommit-auto-props.sh\n@@ -34,8 +34,7 @@ test_expect_success 'enable auto-props config' '\n '\n \n test_expect_success 'add files matching auto-props' '\n-\techo \"#!$SHELL_PATH\" >exec1.sh &&\n-\tchmod +x exec1.sh &&\n+\tprintf \"\" | write_script exec1.sh &&\n \techo \"hello\" >hello.txt &&\n \techo bar >bar &&\n \tgit add exec1.sh hello.txt bar &&\n@@ -48,8 +47,7 @@ test_expect_success 'disable auto-props config' '\n '\n \n test_expect_success 'add files matching disabled auto-props' '\n-\techo \"#$SHELL_PATH\" >exec2.sh &&\n-\tchmod +x exec2.sh &&\n+\tprintf \"\" | write_script exec2.sh &&\n \techo \"world\" >world.txt &&\n \techo zot >zot &&\n \tgit add exec2.sh world.txt zot &&\n@@ -65,7 +63,10 @@ test_expect_success 'check resulting svn repository' '\n \tcd svnrepo &&\n \n \t# Check properties from first commit.\n-\ttest \"x$(svn_cmd propget svn:executable exec1.sh)\" = \"x*\" &&\n+\tif test_have_prereq POSIXPERM\n+\tthen\n+\t\ttest -z \"$(svn_cmd propget svn:executable exec1.sh)\"\n+\tfi &&\n \ttest \"x$(svn_cmd propget svn:mime-type exec1.sh)\" = \\\n \t     \"xapplication/x-shellscript\" &&\n \ttest \"x$(svn_cmd propget svn:mime-type hello.txt)\" = \"xtext/plain\" &&\n@@ -73,7 +74,10 @@ test_expect_success 'check resulting svn repository' '\n \ttest \"x$(svn_cmd propget svn:mime-type bar)\" = \"x\" &&\n \n \t# Check properties from second commit.\n-\ttest \"x$(svn_cmd propget svn:executable exec2.sh)\" = \"x*\" &&\n+\tif test_have_prereq POSIXPERM\n+\tthen\n+\t\ttest -z \"$(svn_cmd propget svn:executable exec2.sh)\"\n+\tfi &&\n \ttest \"x$(svn_cmd propget svn:mime-type exec2.sh)\" = \"x\" &&\n \ttest \"x$(svn_cmd propget svn:mime-type world.txt)\" = \"x\" &&\n \ttest \"x$(svn_cmd propget svn:eol-style world.txt)\" = \"x\" &&\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276807","messageId":"47914e4ceb3ea51636dd5ae308679c9c92fcbef0.1453818790.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453818789.git.johannes.schindelin@gmx.de","subject":"[PATCH v2 19/19] mingw: do not bother to test funny file names","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-26T14:35:43Z","receivedAt":"2016-01-26T14:35:43Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"MSYS2 actually allows to create files or directories whose names contain\ntabs, newlines or colors, even if plain Win32 API cannot access them.\nAs we are using an MSYS2 bash to run the tests, such files or\ndirectories are created successfully, but Git itself has no chance to\nwork with them because it is a regular Windows program, hence limited by\nthe Win32 API.\n\nWith this change, on Windows otherwise failing tests in\nt3300-funny-names.sh, t3600-rm.sh, t3703-add-magic-pathspec.sh,\nt3902-quoted.sh, t4016-diff-quote.sh, t4135-apply-weird-filenames.sh,\nt9200-git-cvsexportcommit.sh, and t9903-bash-prompt.sh are skipped.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t3300-funny-names.sh           | 1 +\n t/t3600-rm.sh                    | 3 ++-\n t/t3703-add-magic-pathspec.sh    | 2 +-\n t/t3902-quoted.sh                | 1 +\n t/t4016-diff-quote.sh            | 1 +\n t/t4135-apply-weird-filenames.sh | 3 ++-\n t/t9200-git-cvsexportcommit.sh   | 2 +-\n t/t9903-bash-prompt.sh           | 2 +-\n 8 files changed, 10 insertions(+), 5 deletions(-)\n\ndiff --git a/t/t3300-funny-names.sh b/t/t3300-funny-names.sh\nindex 9a146f1..04de03c 100755\n--- a/t/t3300-funny-names.sh\n+++ b/t/t3300-funny-names.sh\n@@ -13,6 +13,7 @@ tree, index, and tree objects.\n \n HT='\t'\n \n+test_have_prereq MINGW ||\n echo 2>/dev/null > \"Name with an${HT}HT\"\n if ! test -f \"Name with an${HT}HT\"\n then\ndiff --git a/t/t3600-rm.sh b/t/t3600-rm.sh\nindex 2e47a2b..5232ee9 100755\n--- a/t/t3600-rm.sh\n+++ b/t/t3600-rm.sh\n@@ -14,7 +14,8 @@ test_expect_success \\\n      git add -- foo bar baz 'space embedded' -q &&\n      git commit -m 'add normal files'\"\n \n-if touch -- 'tab\tembedded' 'newline\n+\n+if ! test_have_prereq MINGW && touch -- 'tab\tembedded' 'newline\n embedded' 2>/dev/null\n then\n \ttest_set_prereq FUNNYNAMES\ndiff --git a/t/t3703-add-magic-pathspec.sh b/t/t3703-add-magic-pathspec.sh\nindex 5115de7..aaff784 100755\n--- a/t/t3703-add-magic-pathspec.sh\n+++ b/t/t3703-add-magic-pathspec.sh\n@@ -38,7 +38,7 @@ cat >expected <<EOF\n add 'sub/foo'\n EOF\n \n-if mkdir \":\" 2>/dev/null\n+if ! test_have_prereq MINGW && mkdir \":\" 2>/dev/null\n then\n \ttest_set_prereq COLON_DIR\n fi\ndiff --git a/t/t3902-quoted.sh b/t/t3902-quoted.sh\nindex 892f567..f528008 100755\n--- a/t/t3902-quoted.sh\n+++ b/t/t3902-quoted.sh\n@@ -12,6 +12,7 @@ GN='???'\n HT='\t'\n DQ='\"'\n \n+test_have_prereq MINGW ||\n echo foo 2>/dev/null > \"Name and an${HT}HT\"\n if ! test -f \"Name and an${HT}HT\"\n then\ndiff --git a/t/t4016-diff-quote.sh b/t/t4016-diff-quote.sh\nindex cd543ec..9c48e5c 100755\n--- a/t/t4016-diff-quote.sh\n+++ b/t/t4016-diff-quote.sh\n@@ -13,6 +13,7 @@ P1='pathname\twith HT'\n P2='pathname with SP'\n P3='pathname\n with LF'\n+test_have_prereq !MINGW &&\n echo 2>/dev/null >\"$P1\" && test -f \"$P1\" && rm -f \"$P1\" || {\n \tskip_all='Your filesystem does not allow tabs in filenames'\n \ttest_done\ndiff --git a/t/t4135-apply-weird-filenames.sh b/t/t4135-apply-weird-filenames.sh\nindex bf5dc57..6d6b96d 100755\n--- a/t/t4135-apply-weird-filenames.sh\n+++ b/t/t4135-apply-weird-filenames.sh\n@@ -19,7 +19,8 @@ test_expect_success 'setup' '\n \n \ttest_when_finished \"rm -f \\\"tab\tembedded.txt\\\"\" &&\n \ttest_when_finished \"rm -f '\\''\\\"quoteembedded\\\".txt'\\''\" &&\n-\tif touch -- \"tab\tembedded.txt\" '\\''\"quoteembedded\".txt'\\''\n+\tif ! test_have_prereq MINGW &&\n+\t\ttouch -- \"tab\tembedded.txt\" '\\''\"quoteembedded\".txt'\\''\n \tthen\n \t\ttest_set_prereq FUNNYNAMES\n \tfi\ndiff --git a/t/t9200-git-cvsexportcommit.sh b/t/t9200-git-cvsexportcommit.sh\nindex 812c9cd..5cfb9cf 100755\n--- a/t/t9200-git-cvsexportcommit.sh\n+++ b/t/t9200-git-cvsexportcommit.sh\n@@ -197,7 +197,7 @@ if p=\"??/goo/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/??/??/??\" &&\n then\n \n # This test contains UTF-8 characters\n-test_expect_success \\\n+test_expect_success !MINGW \\\n      'File with non-ascii file name' \\\n      'mkdir -p ??/goo/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/??/??/?? &&\n       echo Foo >??/goo/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/??/??/??/g??rdets??g??rdet.txt &&\ndiff --git a/t/t9903-bash-prompt.sh b/t/t9903-bash-prompt.sh\nindex af82049..2ee6564 100755\n--- a/t/t9903-bash-prompt.sh\n+++ b/t/t9903-bash-prompt.sh\n@@ -67,7 +67,7 @@ repo_with_newline='repo\n with\n newline'\n \n-if mkdir \"$repo_with_newline\" 2>/dev/null\n+if ! test_have_prereq MINGW && mkdir \"$repo_with_newline\" 2>/dev/null\n then\n \ttest_set_prereq FUNNYNAMES\n else\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276822","messageId":"xmqqwpqwck5f.fsf@gitster.mtv.corp.google.com","threadId":"41254","inReplyTo":"alpine.DEB.2.20.1601251910080.2964@virtualbox","subject":"Re: [PATCH 17/19] mingw: fix git-svn tests that expect chmod to work","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-01-26T17:42:20Z","receivedAt":"2016-01-26T17:42:20Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> This is my fault: there are two MINGW prereqs, and they guard against\n> trying to work with file names ending in a dot (which is illegal on\n> Windows' file systems).\n\nAhh, I failed to notice that MINGW was protecting against the \"dot\"\nthing.  So I was wrong; that one cannot be !POSIXPERM.\n\nThanks for clarifying.\n"},{"id":"276828","messageId":"CAPig+cQXVwfyaEzf9fR2tFNon-Jq93iPCMwW9gsB8BnUVv5p3A@mail.gmail.com","threadId":"41254","inReplyTo":"47914e4ceb3ea51636dd5ae308679c9c92fcbef0.1453818790.git.johannes.schindelin@gmx.de","subject":"Re: [PATCH v2 19/19] mingw: do not bother to test funny file names","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2016-01-26T20:03:55Z","receivedAt":"2016-01-26T20:03:55Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Tue, Jan 26, 2016 at 9:35 AM, Johannes Schindelin\n<johannes.schindelin@gmx.de> wrote:\n> MSYS2 actually allows to create files or directories whose names contain\n> tabs, newlines or colors, even if plain Win32 API cannot access them.\n> As we are using an MSYS2 bash to run the tests, such files or\n> directories are created successfully, but Git itself has no chance to\n> work with them because it is a regular Windows program, hence limited by\n> the Win32 API.\n> [...]\n> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> ---\n> diff --git a/t/t3600-rm.sh b/t/t3600-rm.sh\n> @@ -14,7 +14,8 @@ test_expect_success \\\n> -if touch -- 'tab       embedded' 'newline\n> +\n\nIs this new blank line intentional?\n\n> +if ! test_have_prereq MINGW && touch -- 'tab   embedded' 'newline\n> [...]\n> +test_have_prereq !MINGW &&\n\nWhere negation is concerned, is there a non-obvious reason that this\npatch sometimes says:\n\n    ! test_have_prereq MINGW\n\nand sometimes:\n\n    test_have_prereq !MINGW\n\n? Is one form preferred over the other?\n"},{"id":"276830","messageId":"xmqq1t94ccn3.fsf@gitster.mtv.corp.google.com","threadId":"41254","inReplyTo":"CAPig+cQXVwfyaEzf9fR2tFNon-Jq93iPCMwW9gsB8BnUVv5p3A@mail.gmail.com","subject":"Re: [PATCH v2 19/19] mingw: do not bother to test funny file names","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-01-26T20:24:32Z","receivedAt":"2016-01-26T20:24:32Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Sunshine <sunshine@sunshineco.com> writes:\n\n>> +if ! test_have_prereq MINGW && touch -- 'tab   embedded' 'newline\n>> [...]\n>> +test_have_prereq !MINGW &&\n>\n> Where negation is concerned, is there a non-obvious reason that this\n> patch sometimes says:\n>\n>     ! test_have_prereq MINGW\n>\n> and sometimes:\n>\n>     test_have_prereq !MINGW\n>\n> ? Is one form preferred over the other?\n\nThe latter may be preferrable as it can be extended more easily,\ne.g.\n\n\ttest_have_prereq !MINGW,SANITY\n\nwithout having to cascade \"&& test_have_prereq ANOTHER_PREREQ\" in a\nverbose way.\n\nIt is a minor thing that is not worth bothering to \"fix\" from one to\nthe other style once it is committed to my tree, but it may be worth\nsticking to one style in new code.\n"},{"id":"276837","messageId":"xmqqoac8au3t.fsf@gitster.mtv.corp.google.com","threadId":"41254","inReplyTo":"49a0657c42cba813c4cf0c17169b28031c6d4312.1453818790.git.johannes.schindelin@gmx.de","subject":"Re: [PATCH v2 16/19] mingw: mark t9100's test cases with appropriate prereqs","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-01-26T21:50:14Z","receivedAt":"2016-01-26T21:50:14Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <johannes.schindelin@gmx.de> writes:\n\n> @@ -181,7 +180,8 @@ test_expect_success \"$name\" '\n>  name=\"commit with UTF-8 message: locale: $GIT_SVN_LC_ALL\"\n>  LC_ALL=\"$GIT_SVN_LC_ALL\"\n>  export LC_ALL\n> -test_expect_success UTF8 \"$name\" \"\n> +# This test relies on the previous test, hence requires POSIXPERM,SYMLINKS\n> +test_expect_success UTF8,POSIXPERM,SYMLINKS \"$name\" \"\n>  \techo '# hello' >> exec-2.sh &&\n>  \tgit update-index exec-2.sh &&\n>  \tgit commit -m '???????' &&\n\nHmph.  \"Content-Type: text/plain; charset=X-UNKNOWN\" in the header\ngives a hint to me, too.\n\nI'll try to wiggle them in (19/19 has the same X-UNKNOWN), so no\nneed to re-send to fix only this.\n\nThanks.\n"},{"id":"276838","messageId":"xmqqk2mwatjd.fsf@gitster.mtv.corp.google.com","threadId":"41254","inReplyTo":"5aea04c3f348e3891a01b6908bf6562a26f9dd1e.1453818790.git.johannes.schindelin@gmx.de","subject":"Re: [PATCH v2 12/19] mingw: skip test in t1508 that fails due to path conversion","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-01-26T22:02:30Z","receivedAt":"2016-01-26T22:02:30Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <johannes.schindelin@gmx.de> writes:\n\n> In Git for Windows, the MSYS2 POSIX emulation layer used by the Bash\n> converts command-line arguments that looks like they refer to a POSIX\n> path containing a file list (i.e. @<absolute-path>) into a Windows path\n> equivalent when calling non-MSYS2 executables, such as git.exe.\n>\n> Let's just skip the test that uses the parameter `@/at-test` that\n> confuses the MSYS2 runtime.\n>\n> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> ---\n>  t/t1508-at-combinations.sh | 6 +++++-\n>  1 file changed, 5 insertions(+), 1 deletion(-)\n>\n> diff --git a/t/t1508-at-combinations.sh b/t/t1508-at-combinations.sh\n> index 078e119..c59d554 100755\n> --- a/t/t1508-at-combinations.sh\n> +++ b/t/t1508-at-combinations.sh\n> @@ -35,7 +35,10 @@ test_expect_success 'setup' '\n>  \tgit checkout -b upstream-branch &&\n>  \ttest_commit upstream-one &&\n>  \ttest_commit upstream-two &&\n> -\tgit checkout -b @/at-test &&\n> +\tif ! test_have_prereq MINGW\n> +\tthen\n> +\t\tgit checkout -b @/at-slash\n\nI presume that this is meant to be \"@/at-test\", not \"@/at-slash\".\n\n> +\tfi &&\n>  \tgit checkout -b @@/at-test &&\n>  \tgit checkout -b @at-test &&\n>  \tgit checkout -b old-branch &&\n> @@ -64,6 +67,7 @@ check \"@{-1}@{u}@{1}\" commit master-one\n>  check \"@\" commit new-two\n>  check \"@@{u}\" ref refs/heads/upstream-branch\n>  check \"@@/at-test\" ref refs/heads/@@/at-test\n> +test_have_prereq MINGW ||\n>  check \"@/at-test\" ref refs/heads/@/at-test\n>  check \"@at-test\" ref refs/heads/@at-test\n>  nonsense \"@{u}@{-1}\"\n"},{"id":"276839","messageId":"xmqqfuxkatdl.fsf@gitster.mtv.corp.google.com","threadId":"41254","inReplyTo":"4c38596ae3fdcc5906dba49521084fe2b1a6888d.1453818790.git.johannes.schindelin@gmx.de","subject":"Re: [PATCH v2 18/19] mingw: handle the missing POSIXPERM prereq in t9124","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-01-26T22:05:58Z","receivedAt":"2016-01-26T22:05:58Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <johannes.schindelin@gmx.de> writes:\n\n> On Windows, the permission system works completely differently than\n> expected by some of the tests. So let's make sure that we do not test\n> POSIX functionality on Windows.\n>\n> This lets t9124-git-svn-dcommit-auto-props.sh pass in Git for Windows'\n> SDK.\n>\n> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> ---\n>  t/t9124-git-svn-dcommit-auto-props.sh | 16 ++++++++++------\n>  1 file changed, 10 insertions(+), 6 deletions(-)\n>\n> diff --git a/t/t9124-git-svn-dcommit-auto-props.sh b/t/t9124-git-svn-dcommit-auto-props.sh\n> index aa841e1..2be0805 100755\n> --- a/t/t9124-git-svn-dcommit-auto-props.sh\n> +++ b/t/t9124-git-svn-dcommit-auto-props.sh\n> @@ -34,8 +34,7 @@ test_expect_success 'enable auto-props config' '\n>  '\n>  \n>  test_expect_success 'add files matching auto-props' '\n> -\techo \"#!$SHELL_PATH\" >exec1.sh &&\n> -\tchmod +x exec1.sh &&\n> +\tprintf \"\" | write_script exec1.sh &&\n\nThat looks like a useless use of printf.  Why not\n\n\twrite_script exec1.sh </dev/null &&\n\n>  \techo \"hello\" >hello.txt &&\n>  \techo bar >bar &&\n>  \tgit add exec1.sh hello.txt bar &&\n> @@ -48,8 +47,7 @@ test_expect_success 'disable auto-props config' '\n>  '\n>  \n>  test_expect_success 'add files matching disabled auto-props' '\n> -\techo \"#$SHELL_PATH\" >exec2.sh &&\n> -\tchmod +x exec2.sh &&\n> +\tprintf \"\" | write_script exec2.sh &&\n>  \techo \"world\" >world.txt &&\n>  \techo zot >zot &&\n>  \tgit add exec2.sh world.txt zot &&\n> @@ -65,7 +63,10 @@ test_expect_success 'check resulting svn repository' '\n>  \tcd svnrepo &&\n>  \n>  \t# Check properties from first commit.\n> -\ttest \"x$(svn_cmd propget svn:executable exec1.sh)\" = \"x*\" &&\n> +\tif test_have_prereq POSIXPERM\n> +\tthen\n> +\t\ttest -z \"$(svn_cmd propget svn:executable exec1.sh)\"\n\nWhy this change?\n\n\t\ttest \"x$(svn_cmd propget svn:executable exec1.sh)\" = \"x*\" &&\n\nmeans \"propget command gives a literal string that consists of a\nsingle asterisk\".\n\n> +\tfi &&\n>  \ttest \"x$(svn_cmd propget svn:mime-type exec1.sh)\" = \\\n>  \t     \"xapplication/x-shellscript\" &&\n>  \ttest \"x$(svn_cmd propget svn:mime-type hello.txt)\" = \"xtext/plain\" &&\n> @@ -73,7 +74,10 @@ test_expect_success 'check resulting svn repository' '\n>  \ttest \"x$(svn_cmd propget svn:mime-type bar)\" = \"x\" &&\n>  \n>  \t# Check properties from second commit.\n> -\ttest \"x$(svn_cmd propget svn:executable exec2.sh)\" = \"x*\" &&\n> +\tif test_have_prereq POSIXPERM\n> +\tthen\n> +\t\ttest -z \"$(svn_cmd propget svn:executable exec2.sh)\"\n\nLikewise.\n\nPlease do not change things without understanding what they are doing.\n\n> +\tfi &&\n>  \ttest \"x$(svn_cmd propget svn:mime-type exec2.sh)\" = \"x\" &&\n>  \ttest \"x$(svn_cmd propget svn:mime-type world.txt)\" = \"x\" &&\n>  \ttest \"x$(svn_cmd propget svn:eol-style world.txt)\" = \"x\" &&\n"},{"id":"276841","messageId":"xmqqbn88at2y.fsf@gitster.mtv.corp.google.com","threadId":"41254","inReplyTo":"cover.1453818789.git.johannes.schindelin@gmx.de","subject":"Re: [PATCH v2 00/19] Let Git's tests pass on Windows","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-01-26T22:12:21Z","receivedAt":"2016-01-26T22:12:21Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <johannes.schindelin@gmx.de> writes:\n\n> This is a big milestone. With these modifications, Git's source code\n> does not only build without warnings in Git for Windows' SDK, but\n> passes the entire regression test suite.\n\nThanks.\n\nWithout a few fixups, the result of applying these patches made\ntests fail for me (so presumably for everybody !MINGW), which I\nthink I fixed all, but I may have broken things on MINGW while doing\nso.  Please re-fetch from my tree when I pushed the integration\nresult out with this merged somewhere on the 'pu' branch, retest,\nand if I broke something please re-fix them ;-)\n"},{"id":"276872","messageId":"alpine.DEB.2.20.1601270859470.2964@virtualbox","threadId":"41254","inReplyTo":"CAPig+cQXVwfyaEzf9fR2tFNon-Jq93iPCMwW9gsB8BnUVv5p3A@mail.gmail.com","subject":"Re: [PATCH v2 19/19] mingw: do not bother to test funny file names","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-27T08:33:40Z","receivedAt":"2016-01-27T08:33:40Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Eric,\n\nOn Tue, 26 Jan 2016, Eric Sunshine wrote:\n\n> On Tue, Jan 26, 2016 at 9:35 AM, Johannes Schindelin\n> <johannes.schindelin@gmx.de> wrote:\n> > MSYS2 actually allows to create files or directories whose names contain\n> > tabs, newlines or colors, even if plain Win32 API cannot access them.\n> > As we are using an MSYS2 bash to run the tests, such files or\n> > directories are created successfully, but Git itself has no chance to\n> > work with them because it is a regular Windows program, hence limited by\n> > the Win32 API.\n> > [...]\n> > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> > ---\n> > diff --git a/t/t3600-rm.sh b/t/t3600-rm.sh\n> > @@ -14,7 +14,8 @@ test_expect_success \\\n> > -if touch -- 'tab       embedded' 'newline\n> > +\n> \n> Is this new blank line intentional?\n\nAbsolutely not! ;-) Fixed.\n\n> > +if ! test_have_prereq MINGW && touch -- 'tab   embedded' 'newline\n> > [...]\n> > +test_have_prereq !MINGW &&\n> \n> Where negation is concerned, is there a non-obvious reason that this\n> patch sometimes says:\n> \n>     ! test_have_prereq MINGW\n> \n> and sometimes:\n> \n>     test_have_prereq !MINGW\n> \n> ? Is one form preferred over the other?\n\nHysterical raisins. I changed all of them to the latter form, as suggested\nby Junio.\n\nCiao,\nDscho\n"},{"id":"276873","messageId":"alpine.DEB.2.20.1601270936440.2964@virtualbox","threadId":"41254","inReplyTo":"xmqqbn88at2y.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH v2 00/19] Let Git's tests pass on Windows","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-27T08:38:46Z","receivedAt":"2016-01-27T08:38:46Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Tue, 26 Jan 2016, Junio C Hamano wrote:\n\n> Johannes Schindelin <johannes.schindelin@gmx.de> writes:\n> \n> > This is a big milestone. With these modifications, Git's source code\n> > does not only build without warnings in Git for Windows' SDK, but\n> > passes the entire regression test suite.\n> \n> Thanks.\n> \n> Without a few fixups, the result of applying these patches made\n> tests fail for me (so presumably for everybody !MINGW)\n\nDrats! I got lazy and did not re-test everything on Linux after a while\n(it really sloooowed me down and for a good while the tests all succeeded,\nso those regressions were incurred from working on this very patch\nseries...)\n\n> which I think I fixed all, but I may have broken things on MINGW while\n> doing so.  Please re-fetch from my tree when I pushed the integration\n> result out with this merged somewhere on the 'pu' branch, retest, and if\n> I broke something please re-fix them ;-)\n\nI made a couple of other adjustments anyway, so expect a new iteration\nshortly. This time cross-checked on Linux.\n\nCiao,\nDscho\n"},{"id":"276875","messageId":"alpine.DEB.2.20.1601270943390.2964@virtualbox","threadId":"41254","inReplyTo":"xmqqk2mwatjd.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH v2 12/19] mingw: skip test in t1508 that fails due to path conversion","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-27T08:50:07Z","receivedAt":"2016-01-27T08:50:07Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Tue, 26 Jan 2016, Junio C Hamano wrote:\n\n> Johannes Schindelin <johannes.schindelin@gmx.de> writes:\n> \n> > @@ -35,7 +35,10 @@ test_expect_success 'setup' '\n> >  \tgit checkout -b upstream-branch &&\n> >  \ttest_commit upstream-one &&\n> >  \ttest_commit upstream-two &&\n> > -\tgit checkout -b @/at-test &&\n> > +\tif ! test_have_prereq MINGW\n> > +\tthen\n> > +\t\tgit checkout -b @/at-slash\n> \n> I presume that this is meant to be \"@/at-test\", not \"@/at-slash\".\n\nOh my. That's what you get for redoing patches from scratch. Sorry about\nthat!\n\nCiao,\nDscho\n"},{"id":"276879","messageId":"alpine.DEB.2.20.1601271010270.2964@virtualbox","threadId":"41254","inReplyTo":"xmqqfuxkatdl.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH v2 18/19] mingw: handle the missing POSIXPERM prereq in t9124","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-27T09:20:53Z","receivedAt":"2016-01-27T09:20:53Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Tue, 26 Jan 2016, Junio C Hamano wrote:\n\n> Johannes Schindelin <johannes.schindelin@gmx.de> writes:\n> \n> > On Windows, the permission system works completely differently than\n> > expected by some of the tests. So let's make sure that we do not test\n> > POSIX functionality on Windows.\n> >\n> > This lets t9124-git-svn-dcommit-auto-props.sh pass in Git for Windows'\n> > SDK.\n> >\n> > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> > ---\n> >  t/t9124-git-svn-dcommit-auto-props.sh | 16 ++++++++++------\n> >  1 file changed, 10 insertions(+), 6 deletions(-)\n> >\n> > diff --git a/t/t9124-git-svn-dcommit-auto-props.sh b/t/t9124-git-svn-dcommit-auto-props.sh\n> > index aa841e1..2be0805 100755\n> > --- a/t/t9124-git-svn-dcommit-auto-props.sh\n> > +++ b/t/t9124-git-svn-dcommit-auto-props.sh\n> > @@ -34,8 +34,7 @@ test_expect_success 'enable auto-props config' '\n> >  '\n> >  \n> >  test_expect_success 'add files matching auto-props' '\n> > -\techo \"#!$SHELL_PATH\" >exec1.sh &&\n> > -\tchmod +x exec1.sh &&\n> > +\tprintf \"\" | write_script exec1.sh &&\n> \n> That looks like a useless use of printf.  Why not\n> \n> \twrite_script exec1.sh </dev/null &&\n\nGood point! I changed it, also in t9100.\n\n> >  \techo \"hello\" >hello.txt &&\n> >  \techo bar >bar &&\n> >  \tgit add exec1.sh hello.txt bar &&\n> > @@ -48,8 +47,7 @@ test_expect_success 'disable auto-props config' '\n> >  '\n> >  \n> >  test_expect_success 'add files matching disabled auto-props' '\n> > -\techo \"#$SHELL_PATH\" >exec2.sh &&\n> > -\tchmod +x exec2.sh &&\n> > +\tprintf \"\" | write_script exec2.sh &&\n> >  \techo \"world\" >world.txt &&\n> >  \techo zot >zot &&\n> >  \tgit add exec2.sh world.txt zot &&\n> > @@ -65,7 +63,10 @@ test_expect_success 'check resulting svn repository' '\n> >  \tcd svnrepo &&\n> >  \n> >  \t# Check properties from first commit.\n> > -\ttest \"x$(svn_cmd propget svn:executable exec1.sh)\" = \"x*\" &&\n> > +\tif test_have_prereq POSIXPERM\n> > +\tthen\n> > +\t\ttest -z \"$(svn_cmd propget svn:executable exec1.sh)\"\n> \n> Why this change?\n> \n> \t\ttest \"x$(svn_cmd propget svn:executable exec1.sh)\" = \"x*\" &&\n> \n> means \"propget command gives a literal string that consists of a\n> single asterisk\".\n\nOh wow... I blame it on lack of sleep. Would you believe that I totally\noverlooked the asterisk, in both cases? Wow.\n\nSorry for the mess, cleaned it up locally and will resubmit as soon as the\ntests passed on both Windows & Linux, and as soon as I figure out how to\nchange my charset to something else than unknown.\n\nMy apologies,\nDscho\n\nP.S.: Would you believe that the reason the tests passed on Linux was that\nI forgot to install Subversion? ;-)\n"},{"id":"276895","messageId":"alpine.DEB.2.20.1601271701390.2964@virtualbox","threadId":"41254","inReplyTo":"xmqqoac8au3t.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH v2 16/19] mingw: mark t9100's test cases with appropriate prereqs","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-27T16:02:25Z","receivedAt":"2016-01-27T16:02:25Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Tue, 26 Jan 2016, Junio C Hamano wrote:\n\n> Johannes Schindelin <johannes.schindelin@gmx.de> writes:\n> \n> > @@ -181,7 +180,8 @@ test_expect_success \"$name\" '\n> >  name=\"commit with UTF-8 message: locale: $GIT_SVN_LC_ALL\"\n> >  LC_ALL=\"$GIT_SVN_LC_ALL\"\n> >  export LC_ALL\n> > -test_expect_success UTF8 \"$name\" \"\n> > +# This test relies on the previous test, hence requires POSIXPERM,SYMLINKS\n> > +test_expect_success UTF8,POSIXPERM,SYMLINKS \"$name\" \"\n> >  \techo '# hello' >> exec-2.sh &&\n> >  \tgit update-index exec-2.sh &&\n> >  \tgit commit -m '???????' &&\n> \n> Hmph.  \"Content-Type: text/plain; charset=X-UNKNOWN\" in the header\n> gives a hint to me, too.\n\nBah. I recently upgraded to a newer Alpine and must have overlooked the\nunknown charset option. Sorry for that, I think I fixed it now (let me\nknow if not).\n\nCiao,\nDscho\n"},{"id":"276897","messageId":"cover.1453911367.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453818789.git.johannes.schindelin@gmx.de","subject":"[PATCH v3 00/20] Let Git's tests pass on Windows","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-27T16:19:02Z","receivedAt":"2016-01-27T16:19:02Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"This is a big milestone. With these modifications, Git's source code\ndoes not only build without warnings in Git for Windows' SDK, but\npasses the entire regression test suite.\n\nThe patch series contains three different types of patches. First,\nthere are a couple of real fixes that were triggered by failures in\nthe regression tests. Then there are a couple of fixes to the\nregression tests themselves. And finally, we have to disable a couple\nof tests because we simply cannot make them work on Windows.\n\nRelative to v2, this fixes stupid typos that made the tests fail on\nLinux, a stupid copy-paste error pointed out by Eric Sunshine,\nunnecessary 'printf \"\"' calls pointed out by Junio Hamano, and I now\nuse `test_have_prereq !MINGW` consistently, as pointed out by both Eric\nand Junio. This time, I also send the patch series with the character\nset set (sic!) to UTF-8. Oh, and this time, I also made sure that the\nregression tests pass on Windows & Linux alike. Oh, and I also managed not\nto forget the fix for t9130 this time.\n\n\nJohannes Schindelin (17):\n  mingw: let's use gettext with MSYS2\n  mingw: do not trust MSYS2's MinGW gettext.sh\n  Git.pm: stop assuming that absolute paths start with a slash\n  mingw: prepare the TMPDIR environment variable for shell scripts\n  mingw: let lstat() fail with errno == ENOTDIR when appropriate\n  mingw: fix t5601-clone.sh\n  mingw: accomodate t0060-path-utils for MSYS2\n  mingw: disable mkfifo-based tests\n  tests: turn off git-daemon tests if FIFOs are not available\n  mingw: skip test in t1508 that fails due to path conversion\n  mingw: fix t9700's assumption about directory separators\n  mingw: work around pwd issues in the tests\n  mingw: mark t9100's test cases with appropriate prereqs\n  mingw: avoid illegal filename in t9118\n  mingw: handle the missing POSIXPERM prereq in t9124\n  mingw: skip a test in t9130 that cannot pass on Windows\n  mingw: do not bother to test funny file names\n\nKarsten Blees (1):\n  mingw: factor out Windows specific environment setup\n\nPat Thoyts (1):\n  Avoid absolute path in t0008\n\n마누엘 (1):\n  mingw: try to delete target directory before renaming\n\n Makefile                              |  1 +\n compat/mingw.c                        | 91 +++++++++++++++++++++++++++++------\n config.mak.uname                      |  3 +-\n perl/Git.pm                           |  3 +-\n t/lib-git-daemon.sh                   |  5 ++\n t/t0008-ignores.sh                    |  2 +-\n t/t0060-path-utils.sh                 |  9 ++++\n t/t1508-at-combinations.sh            |  6 ++-\n t/t3300-funny-names.sh                |  1 +\n t/t3600-rm.sh                         |  2 +-\n t/t3703-add-magic-pathspec.sh         |  2 +-\n t/t3902-quoted.sh                     |  1 +\n t/t4016-diff-quote.sh                 |  1 +\n t/t4135-apply-weird-filenames.sh      |  3 +-\n t/t5601-clone.sh                      | 18 +++----\n t/t7800-difftool.sh                   | 14 +++---\n t/t9100-git-svn-basic.sh              | 18 +++----\n t/t9118-git-svn-funky-branch-names.sh | 12 +++--\n t/t9124-git-svn-dcommit-auto-props.sh | 16 +++---\n t/t9130-git-svn-authors-file.sh       |  2 +-\n t/t9200-git-cvsexportcommit.sh        |  2 +-\n t/t9400-git-cvsserver-server.sh       |  6 +--\n t/t9401-git-cvsserver-crlf.sh         |  6 +--\n t/t9402-git-cvsserver-refs.sh         |  6 +--\n t/t9700/test.pl                       |  2 +-\n t/t9903-bash-prompt.sh                |  2 +-\n t/test-lib.sh                         |  2 +-\n test-fake-ssh.c                       | 30 ++++++++++++\n 28 files changed, 196 insertions(+), 70 deletions(-)\n create mode 100644 test-fake-ssh.c\n\nInterdiff vs v2:\n\n diff --git a/t/t1508-at-combinations.sh b/t/t1508-at-combinations.sh\n index c59d554..4a9964e 100755\n --- a/t/t1508-at-combinations.sh\n +++ b/t/t1508-at-combinations.sh\n @@ -35,9 +35,9 @@ test_expect_success 'setup' '\n  \tgit checkout -b upstream-branch &&\n  \ttest_commit upstream-one &&\n  \ttest_commit upstream-two &&\n -\tif ! test_have_prereq MINGW\n +\tif test_have_prereq !MINGW\n  \tthen\n -\t\tgit checkout -b @/at-slash\n +\t\tgit checkout -b @/at-test\n  \tfi &&\n  \tgit checkout -b @@/at-test &&\n  \tgit checkout -b @at-test &&\n diff --git a/t/t3600-rm.sh b/t/t3600-rm.sh\n index 5232ee9..d046d98 100755\n --- a/t/t3600-rm.sh\n +++ b/t/t3600-rm.sh\n @@ -14,8 +14,7 @@ test_expect_success \\\n       git add -- foo bar baz 'space embedded' -q &&\n       git commit -m 'add normal files'\"\n  \n -\n -if ! test_have_prereq MINGW && touch -- 'tab\tembedded' 'newline\n +if test_have_prereq !MINGW && touch -- 'tab\tembedded' 'newline\n  embedded' 2>/dev/null\n  then\n  \ttest_set_prereq FUNNYNAMES\n diff --git a/t/t3703-add-magic-pathspec.sh b/t/t3703-add-magic-pathspec.sh\n index aaff784..3ef525a 100755\n --- a/t/t3703-add-magic-pathspec.sh\n +++ b/t/t3703-add-magic-pathspec.sh\n @@ -38,7 +38,7 @@ cat >expected <<EOF\n  add 'sub/foo'\n  EOF\n  \n -if ! test_have_prereq MINGW && mkdir \":\" 2>/dev/null\n +if test_have_prereq !MINGW && mkdir \":\" 2>/dev/null\n  then\n  \ttest_set_prereq COLON_DIR\n  fi\n diff --git a/t/t4135-apply-weird-filenames.sh b/t/t4135-apply-weird-filenames.sh\n index 6d6b96d..27cb000 100755\n --- a/t/t4135-apply-weird-filenames.sh\n +++ b/t/t4135-apply-weird-filenames.sh\n @@ -19,7 +19,7 @@ test_expect_success 'setup' '\n  \n  \ttest_when_finished \"rm -f \\\"tab\tembedded.txt\\\"\" &&\n  \ttest_when_finished \"rm -f '\\''\\\"quoteembedded\\\".txt'\\''\" &&\n -\tif ! test_have_prereq MINGW &&\n +\tif test_have_prereq !MINGW &&\n  \t\ttouch -- \"tab\tembedded.txt\" '\\''\"quoteembedded\".txt'\\''\n  \tthen\n  \t\ttest_set_prereq FUNNYNAMES\n diff --git a/t/t5601-clone.sh b/t/t5601-clone.sh\n index 2f4272a..c1efb8e 100755\n --- a/t/t5601-clone.sh\n +++ b/t/t5601-clone.sh\n @@ -5,7 +5,7 @@ test_description=clone\n  . ./test-lib.sh\n  \n  X=\n -! test_have_prereq MINGW || X=.exe\n +test_have_prereq !MINGW || X=.exe\n  \n  test_expect_success setup '\n  \n diff --git a/t/t9100-git-svn-basic.sh b/t/t9100-git-svn-basic.sh\n index 5b32a3b..56acc1e 100755\n --- a/t/t9100-git-svn-basic.sh\n +++ b/t/t9100-git-svn-basic.sh\n @@ -30,7 +30,7 @@ test_expect_success \\\n  \t\techo \"deep dir\" >dir/a/b/c/d/e/file &&\n  \t\tmkdir bar &&\n  \t\techo \"zzz\" >bar/zzz &&\n -\t\tprintf \"\" | write_script exec.sh &&\n +\t\twrite_script exec.sh </dev/null &&\n  \t\tsvn_cmd import -m \"import for git svn\" . \"$svnrepo\" >/dev/null\n  \t) &&\n  \trm -rf import &&\n diff --git a/t/t9124-git-svn-dcommit-auto-props.sh b/t/t9124-git-svn-dcommit-auto-props.sh\n index 2be0805..9f7231d 100755\n --- a/t/t9124-git-svn-dcommit-auto-props.sh\n +++ b/t/t9124-git-svn-dcommit-auto-props.sh\n @@ -34,7 +34,7 @@ test_expect_success 'enable auto-props config' '\n  '\n  \n  test_expect_success 'add files matching auto-props' '\n -\tprintf \"\" | write_script exec1.sh &&\n +\twrite_script exec1.sh </dev/null &&\n  \techo \"hello\" >hello.txt &&\n  \techo bar >bar &&\n  \tgit add exec1.sh hello.txt bar &&\n @@ -47,7 +47,7 @@ test_expect_success 'disable auto-props config' '\n  '\n  \n  test_expect_success 'add files matching disabled auto-props' '\n -\tprintf \"\" | write_script exec2.sh &&\n +\twrite_script exec2.sh </dev/null &&\n  \techo \"world\" >world.txt &&\n  \techo zot >zot &&\n  \tgit add exec2.sh world.txt zot &&\n @@ -65,7 +65,7 @@ test_expect_success 'check resulting svn repository' '\n  \t# Check properties from first commit.\n  \tif test_have_prereq POSIXPERM\n  \tthen\n -\t\ttest -z \"$(svn_cmd propget svn:executable exec1.sh)\"\n +\t\ttest \"x$(svn_cmd propget svn:executable exec1.sh)\" = \"x*\"\n  \tfi &&\n  \ttest \"x$(svn_cmd propget svn:mime-type exec1.sh)\" = \\\n  \t     \"xapplication/x-shellscript\" &&\n @@ -76,7 +76,7 @@ test_expect_success 'check resulting svn repository' '\n  \t# Check properties from second commit.\n  \tif test_have_prereq POSIXPERM\n  \tthen\n -\t\ttest -z \"$(svn_cmd propget svn:executable exec2.sh)\"\n +\t\ttest \"x$(svn_cmd propget svn:executable exec2.sh)\" = \"x*\"\n  \tfi &&\n  \ttest \"x$(svn_cmd propget svn:mime-type exec2.sh)\" = \"x\" &&\n  \ttest \"x$(svn_cmd propget svn:mime-type world.txt)\" = \"x\" &&\n diff --git a/t/t9130-git-svn-authors-file.sh b/t/t9130-git-svn-authors-file.sh\n index d306b77..4126481 100755\n --- a/t/t9130-git-svn-authors-file.sh\n +++ b/t/t9130-git-svn-authors-file.sh\n @@ -91,7 +91,7 @@ test_expect_success 'fetch continues after authors-file is fixed' '\n  \t)\n  \t'\n  \n -test_expect_success 'fresh clone with svn.authors-file in config' '\n +test_expect_success !MINGW 'fresh clone with svn.authors-file in config' '\n  \t(\n  \t\trm -r \"$GIT_DIR\" &&\n  \t\ttest x = x\"$(git config svn.authorsfile)\" &&\n diff --git a/t/t9903-bash-prompt.sh b/t/t9903-bash-prompt.sh\n index 2ee6564..ffbfa0e 100755\n --- a/t/t9903-bash-prompt.sh\n +++ b/t/t9903-bash-prompt.sh\n @@ -67,7 +67,7 @@ repo_with_newline='repo\n  with\n  newline'\n  \n -if ! test_have_prereq MINGW && mkdir \"$repo_with_newline\" 2>/dev/null\n +if test_have_prereq !MINGW && mkdir \"$repo_with_newline\" 2>/dev/null\n  then\n  \ttest_set_prereq FUNNYNAMES\n  else\n\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276898","messageId":"8ac78eac5606d74d8c62bcdb2b0346f4a9b0a9a4.1453911367.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453911367.git.johannes.schindelin@gmx.de","subject":"[PATCH v3 01/20] mingw: let's use gettext with MSYS2","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-27T16:19:07Z","receivedAt":"2016-01-27T16:19:07Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"This solves two problems:\n\n- we now have proper localisation even on Windows\n\n- we sidestep the infamous \"BUG: your vsnprintf is broken (returned -1)\"\n  message when running \"git init\" (which otherwise prevents the entire\n  test suite from running) because libintl.h overrides vsnprintf() with\n  libintl_vsnprintf() [*1*]\n\nThe latter issue is rather crucial, as *no* test passes in Git for\nWindows without this fix.\n\nFootnote *1*: gettext_git=http://git.savannah.gnu.org/cgit/gettext.git\n$gettext_git/tree/gettext-runtime/intl/libgnuintl.in.h#n380\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n config.mak.uname | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/config.mak.uname b/config.mak.uname\nindex 4b2e1b8..6b25661 100644\n--- a/config.mak.uname\n+++ b/config.mak.uname\n@@ -560,7 +560,7 @@ else\n \t\tNO_R_TO_GCC_LINKER = YesPlease\n \t\tINTERNAL_QSORT = YesPlease\n \t\tHAVE_LIBCHARSET_H = YesPlease\n-\t\tNO_GETTEXT = YesPlease\n+\t\tNO_GETTEXT =\n \t\tUSE_LIBPCRE= YesPlease\n \t\tNO_CURL =\n \t\tUSE_NED_ALLOCATOR = YesPlease\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276899","messageId":"a5d26716b9bfe9bb6c2be389b398b004bcdd0bb4.1453911367.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453911367.git.johannes.schindelin@gmx.de","subject":"[PATCH v3 02/20] mingw: do not trust MSYS2's MinGW gettext.sh","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-27T16:19:12Z","receivedAt":"2016-01-27T16:19:12Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"It does not quite work because it produces DOS line endings which the\nshell does not like at all.\n\nThis lets t0200-gettext-basic.sh, t0204-gettext-reencode-sanity.sh,\nt3406-rebase-message.sh, t3903-stash.sh, t7400-submodule-basic.sh,\nt7401-submodule-summary.sh, t7406-submodule-update.sh and\nt7407-submodule-foreach.sh pass in Git for Windows' SDK.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n config.mak.uname | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/config.mak.uname b/config.mak.uname\nindex 6b25661..d6f7980 100644\n--- a/config.mak.uname\n+++ b/config.mak.uname\n@@ -561,6 +561,7 @@ else\n \t\tINTERNAL_QSORT = YesPlease\n \t\tHAVE_LIBCHARSET_H = YesPlease\n \t\tNO_GETTEXT =\n+\t\tUSE_GETTEXT_SCHEME = fallthrough\n \t\tUSE_LIBPCRE= YesPlease\n \t\tNO_CURL =\n \t\tUSE_NED_ALLOCATOR = YesPlease\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276896","messageId":"af44eca2a1190be237429b4f02186d3a42208087.1453911367.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453911367.git.johannes.schindelin@gmx.de","subject":"[PATCH v3 03/20] Git.pm: stop assuming that absolute paths start with a slash","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-27T16:19:16Z","receivedAt":"2016-01-27T16:19:16Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"On Windows, absolute paths never start with a slash, unless a POSIX\nemulation layer is used. The latter is the case for MSYS2's Perl that\nGit for Windows leverages. However, in the tests we also go through\nplain `git.exe`, which does *not* leverage the POSIX emulation layer,\nand therefore the paths we pass to Perl may actually be DOS-style paths\nsuch as C:/Program Files/Git.\n\nSo let's just use Perl's own way to test whether a given path is\nabsolute or not instead of home-brewing our own.\n\nThis patch partially fixes t7800 and t9700 when running in Git for\nWindows' SDK.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n perl/Git.pm | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/perl/Git.pm b/perl/Git.pm\nindex 19ef081..49eb88a 100644\n--- a/perl/Git.pm\n+++ b/perl/Git.pm\n@@ -188,7 +188,8 @@ sub repository {\n \t\t};\n \n \t\tif ($dir) {\n-\t\t\t$dir =~ m#^/# or $dir = $opts{Directory} . '/' . $dir;\n+\t\t\t_verify_require();\n+\t\t\tFile::Spec->file_name_is_absolute($dir) or $dir = $opts{Directory} . '/' . $dir;\n \t\t\t$opts{Repository} = abs_path($dir);\n \n \t\t\t# If --git-dir went ok, this shouldn't die either.\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276900","messageId":"8cd3fc74bbbd012b10f8fbb275fc2f64bd3b6195.1453911367.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453911367.git.johannes.schindelin@gmx.de","subject":"[PATCH v3 04/20] mingw: factor out Windows specific environment setup","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-27T16:19:21Z","receivedAt":"2016-01-27T16:19:21Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Karsten Blees <blees@dcon.de>\n\nWe will add more environment-related code to that new function\nin the next patch.\n\nSigned-off-by: Karsten Blees <blees@dcon.de>\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n compat/mingw.c | 30 +++++++++++++++++-------------\n 1 file changed, 17 insertions(+), 13 deletions(-)\n\ndiff --git a/compat/mingw.c b/compat/mingw.c\nindex 77a51d3..8d52c73 100644\n--- a/compat/mingw.c\n+++ b/compat/mingw.c\n@@ -2047,6 +2047,22 @@ int xwcstoutf(char *utf, const wchar_t *wcs, size_t utflen)\n \treturn -1;\n }\n \n+static void setup_windows_environment()\n+{\n+\t/* on Windows it is TMP and TEMP */\n+\tif (!getenv(\"TMPDIR\")) {\n+\t\tconst char *tmp = getenv(\"TMP\");\n+\t\tif (!tmp)\n+\t\t\ttmp = getenv(\"TEMP\");\n+\t\tif (tmp)\n+\t\t\tsetenv(\"TMPDIR\", tmp, 1);\n+\t}\n+\n+\t/* simulate TERM to enable auto-color (see color.c) */\n+\tif (!getenv(\"TERM\"))\n+\t\tsetenv(\"TERM\", \"cygwin\", 1);\n+}\n+\n /*\n  * Disable MSVCRT command line wildcard expansion (__getmainargs called from\n  * mingw startup code, see init.c in mingw runtime).\n@@ -2125,19 +2141,7 @@ void mingw_startup()\n \tqsort(environ, i, sizeof(char*), compareenv);\n \n \t/* fix Windows specific environment settings */\n-\n-\t/* on Windows it is TMP and TEMP */\n-\tif (!mingw_getenv(\"TMPDIR\")) {\n-\t\tconst char *tmp = mingw_getenv(\"TMP\");\n-\t\tif (!tmp)\n-\t\t\ttmp = mingw_getenv(\"TEMP\");\n-\t\tif (tmp)\n-\t\t\tsetenv(\"TMPDIR\", tmp, 1);\n-\t}\n-\n-\t/* simulate TERM to enable auto-color (see color.c) */\n-\tif (!getenv(\"TERM\"))\n-\t\tsetenv(\"TERM\", \"cygwin\", 1);\n+\tsetup_windows_environment();\n \n \t/* initialize critical section for waitpid pinfo_t list */\n \tInitializeCriticalSection(&pinfo_cs);\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276901","messageId":"99caadcf6af5619988792b47b50d70b691d355c3.1453911367.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453911367.git.johannes.schindelin@gmx.de","subject":"[PATCH v3 05/20] mingw: prepare the TMPDIR environment variable for shell scripts","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-27T16:19:25Z","receivedAt":"2016-01-27T16:19:25Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"When shell scripts access a $TMPDIR variable containing backslashes,\nthey will be mistaken for escape characters. Let's not let that happen\nby converting them to forward slashes.\n\nThis partially fixes t7800 with MSYS2.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n compat/mingw.c | 23 +++++++++++++++++++----\n 1 file changed, 19 insertions(+), 4 deletions(-)\n\ndiff --git a/compat/mingw.c b/compat/mingw.c\nindex 8d52c73..ba5cb1c 100644\n--- a/compat/mingw.c\n+++ b/compat/mingw.c\n@@ -2049,13 +2049,28 @@ int xwcstoutf(char *utf, const wchar_t *wcs, size_t utflen)\n \n static void setup_windows_environment()\n {\n+\tchar *tmp = getenv(\"TMPDIR\");\n+\n \t/* on Windows it is TMP and TEMP */\n-\tif (!getenv(\"TMPDIR\")) {\n-\t\tconst char *tmp = getenv(\"TMP\");\n-\t\tif (!tmp)\n+\tif (!tmp) {\n+\t\tif (!(tmp = getenv(\"TMP\")))\n \t\t\ttmp = getenv(\"TEMP\");\n-\t\tif (tmp)\n+\t\tif (tmp) {\n \t\t\tsetenv(\"TMPDIR\", tmp, 1);\n+\t\t\ttmp = getenv(\"TMPDIR\");\n+\t\t}\n+\t}\n+\n+\tif (tmp) {\n+\t\t/*\n+\t\t * Convert all dir separators to forward slashes,\n+\t\t * to help shell commands called from the Git\n+\t\t * executable (by not mistaking the dir separators\n+\t\t * for escape characters).\n+\t\t */\n+\t\tfor (; *tmp; tmp++)\n+\t\t\tif (*tmp == '\\\\')\n+\t\t\t\t*tmp = '/';\n \t}\n \n \t/* simulate TERM to enable auto-color (see color.c) */\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276902","messageId":"2185537d1ded7926241414b32e553d7ce4cd2935.1453911367.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453911367.git.johannes.schindelin@gmx.de","subject":"[PATCH v3 06/20] mingw: try to delete target directory before renaming","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-27T16:19:29Z","receivedAt":"2016-01-27T16:19:29Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: =?UTF-8?q?=EB=A7=88=EB=88=84=EC=97=98?= <nalla@hamal.uberspace.de>\n\nWhen the rename() function tries to move a directory it fails if the\ntarget directory exists. It should check if it can delete the (possibly\nempty) target directory and then try again to move the directory.\n\nThis partially fixes t9100-git-svn-basic.sh.\n\nSigned-off-by: 마누엘 <nalla@hamal.uberspace.de>\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n compat/mingw.c | 7 ++++++-\n 1 file changed, 6 insertions(+), 1 deletion(-)\n\ndiff --git a/compat/mingw.c b/compat/mingw.c\nindex ba5cb1c..f37f8d5 100644\n--- a/compat/mingw.c\n+++ b/compat/mingw.c\n@@ -1603,7 +1603,12 @@ repeat:\n \tif (gle == ERROR_ACCESS_DENIED &&\n \t    (attrs = GetFileAttributesW(wpnew)) != INVALID_FILE_ATTRIBUTES) {\n \t\tif (attrs & FILE_ATTRIBUTE_DIRECTORY) {\n-\t\t\terrno = EISDIR;\n+\t\t\tDWORD attrsold = GetFileAttributesW(wpold);\n+\t\t\tif (attrsold == INVALID_FILE_ATTRIBUTES ||\n+\t\t\t    !(attrsold & FILE_ATTRIBUTE_DIRECTORY))\n+\t\t\t\terrno = EISDIR;\n+\t\t\telse if (!_wrmdir(wpnew))\n+\t\t\t\tgoto repeat;\n \t\t\treturn -1;\n \t\t}\n \t\tif ((attrs & FILE_ATTRIBUTE_READONLY) &&\n-- \n2.7.0.windows.1.7.g55a05c8\n\n"},{"id":"276906","messageId":"4a4f5b608e1782fd5b65f005921527c54074e792.1453911367.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453911367.git.johannes.schindelin@gmx.de","subject":"[PATCH v3 07/20] mingw: let lstat() fail with errno == ENOTDIR when appropriate","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-27T16:19:33Z","receivedAt":"2016-01-27T16:19:33Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"POSIX semantics requires lstat() to fail with ENOTDIR when \"[a]\ncomponent of the path prefix names an existing file that is neither a\ndirectory nor a symbolic link to a directory\".\n\nSee http://pubs.opengroup.org/onlinepubs/9699919799/functions/lstat.html\n\nThis behavior is expected by t1404-update-ref-df-conflicts now.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n compat/mingw.c | 39 +++++++++++++++++++++++++++++++++++++++\n 1 file changed, 39 insertions(+)\n\ndiff --git a/compat/mingw.c b/compat/mingw.c\nindex f37f8d5..fbe69b8 100644\n--- a/compat/mingw.c\n+++ b/compat/mingw.c\n@@ -454,6 +454,39 @@ static inline time_t filetime_to_time_t(const FILETIME *ft)\n \treturn (time_t)(filetime_to_hnsec(ft) / 10000000);\n }\n \n+/**\n+ * Verifies that safe_create_leading_directories() would succeed.\n+ */\n+static int has_valid_directory_prefix(wchar_t *wfilename)\n+{\n+\tint n = wcslen(wfilename);\n+\n+\twhile (n > 0) {\n+\t\twchar_t c = wfilename[--n];\n+\t\tDWORD attributes;\n+\n+\t\tif (!is_dir_sep(c))\n+\t\t\tcontinue;\n+\n+\t\twfilename[n] = L'\\0';\n+\t\tattributes = GetFileAttributesW(wfilename);\n+\t\twfilename[n] = c;\n+\t\tif (attributes == FILE_ATTRIBUTE_DIRECTORY ||\n+\t\t\t\tattributes == FILE_ATTRIBUTE_DEVICE)\n+\t\t\treturn 1;\n+\t\tif (attributes == INVALID_FILE_ATTRIBUTES)\n+\t\t\tswitch (GetLastError()) {\n+\t\t\tcase ERROR_PATH_NOT_FOUND:\n+\t\t\t\tcontinue;\n+\t\t\tcase ERROR_FILE_NOT_FOUND:\n+\t\t\t\t/* This implies parent directory exists. */\n+\t\t\t\treturn 1;\n+\t\t\t}\n+\t\treturn 0;\n+\t}\n+\treturn 1;\n+}\n+\n /* We keep the do_lstat code in a separate function to avoid recursion.\n  * When a path ends with a slash, the stat will fail with ENOENT. In\n  * this case, we strip the trailing slashes and stat again.\n@@ -514,6 +547,12 @@ static int do_lstat(int follow, const char *file_name, struct stat *buf)\n \tcase ERROR_NOT_ENOUGH_MEMORY:\n \t\terrno = ENOMEM;\n \t\tbreak;\n+\tcase ERROR_PATH_NOT_FOUND:\n+\t\tif (!has_valid_directory_prefix(wfilename)) {\n+\t\t\terrno = ENOTDIR;\n+\t\t\tbreak;\n+\t\t}\n+\t\t/* fallthru */\n \tdefault:\n \t\terrno = ENOENT;\n \t\tbreak;\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276903","messageId":"0beebb376eebae00be2e82aa7ffe7cc3835c2740.1453911367.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453911367.git.johannes.schindelin@gmx.de","subject":"[PATCH v3 08/20] mingw: fix t5601-clone.sh","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-27T16:19:37Z","receivedAt":"2016-01-27T16:19:37Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Since baaf233 (connect: improve check for plink to reduce false\npositives, 2015-04-26), t5601 writes out a `plink.exe` for testing that\nis actually a shell script. So the assumption that the `.exe` extension\nimplies that the file is *not* a shell script is now wrong.\n\nSince there was no love for the idea of allowing `.exe` files to be\nshell scripts on Windows, let's go the other way round: *make*\n`plink.exe` a real `.exe`.\n\nThis fixes t5601-clone.sh in Git for Windows' SDK.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n Makefile         |  1 +\n t/t5601-clone.sh | 18 ++++++++----------\n test-fake-ssh.c  | 30 ++++++++++++++++++++++++++++++\n 3 files changed, 39 insertions(+), 10 deletions(-)\n create mode 100644 test-fake-ssh.c\n\ndiff --git a/Makefile b/Makefile\nindex fc2f1ab..10566d6 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -583,6 +583,7 @@ TEST_PROGRAMS_NEED_X += test-delta\n TEST_PROGRAMS_NEED_X += test-dump-cache-tree\n TEST_PROGRAMS_NEED_X += test-dump-split-index\n TEST_PROGRAMS_NEED_X += test-dump-untracked-cache\n+TEST_PROGRAMS_NEED_X += test-fake-ssh\n TEST_PROGRAMS_NEED_X += test-genrandom\n TEST_PROGRAMS_NEED_X += test-hashmap\n TEST_PROGRAMS_NEED_X += test-index-version\ndiff --git a/t/t5601-clone.sh b/t/t5601-clone.sh\nindex 669ec9b..c1efb8e 100755\n--- a/t/t5601-clone.sh\n+++ b/t/t5601-clone.sh\n@@ -4,6 +4,9 @@ test_description=clone\n \n . ./test-lib.sh\n \n+X=\n+test_have_prereq !MINGW || X=.exe\n+\n test_expect_success setup '\n \n \trm -fr .git &&\n@@ -305,14 +308,9 @@ test_expect_success 'clone checking out a tag' '\n \n setup_ssh_wrapper () {\n \ttest_expect_success 'setup ssh wrapper' '\n-\t\twrite_script \"$TRASH_DIRECTORY/ssh-wrapper\" <<-\\EOF &&\n-\t\techo >>\"$TRASH_DIRECTORY/ssh-output\" \"ssh: $*\" &&\n-\t\t# throw away all but the last argument, which should be the\n-\t\t# command\n-\t\twhile test $# -gt 1; do shift; done\n-\t\teval \"$1\"\n-\t\tEOF\n-\t\tGIT_SSH=\"$TRASH_DIRECTORY/ssh-wrapper\" &&\n+\t\tcp \"$GIT_BUILD_DIR/test-fake-ssh$X\" \\\n+\t\t\t\"$TRASH_DIRECTORY/ssh-wrapper$X\" &&\n+\t\tGIT_SSH=\"$TRASH_DIRECTORY/ssh-wrapper$X\" &&\n \t\texport GIT_SSH &&\n \t\texport TRASH_DIRECTORY &&\n \t\t>\"$TRASH_DIRECTORY\"/ssh-output\n@@ -320,8 +318,8 @@ setup_ssh_wrapper () {\n }\n \n copy_ssh_wrapper_as () {\n-\tcp \"$TRASH_DIRECTORY/ssh-wrapper\" \"$1\" &&\n-\tGIT_SSH=\"$1\" &&\n+\tcp \"$TRASH_DIRECTORY/ssh-wrapper$X\" \"${1%$X}$X\" &&\n+\tGIT_SSH=\"${1%$X}$X\" &&\n \texport GIT_SSH\n }\n \ndiff --git a/test-fake-ssh.c b/test-fake-ssh.c\nnew file mode 100644\nindex 0000000..980de21\n--- /dev/null\n+++ b/test-fake-ssh.c\n@@ -0,0 +1,30 @@\n+#include \"git-compat-util.h\"\n+#include \"run-command.h\"\n+#include \"strbuf.h\"\n+\n+int main(int argc, char **argv)\n+{\n+\tconst char *trash_directory = getenv(\"TRASH_DIRECTORY\");\n+\tstruct strbuf buf = STRBUF_INIT;\n+\tFILE *f;\n+\tint i;\n+\tconst char *child_argv[] = { NULL, NULL };\n+\n+\t/* First, print all parameters into $TRASH_DIRECTORY/ssh-output */\n+\tif (!trash_directory)\n+\t\tdie(\"Need a TRASH_DIRECTORY!\");\n+\tstrbuf_addf(&buf, \"%s/ssh-output\", trash_directory);\n+\tf = fopen(buf.buf, \"w\");\n+\tif (!f)\n+\t\tdie(\"Could not write to %s\", buf.buf);\n+\tfor (i = 0; i < argc; i++)\n+\t\tfprintf(f, \"%s%s\", i > 0 ? \" \" : \"\", i > 0 ? argv[i] : \"ssh:\");\n+\tfprintf(f, \"\\n\");\n+\tfclose(f);\n+\n+\t/* Now, evaluate the *last* parameter */\n+\tif (argc < 2)\n+\t\treturn 0;\n+\tchild_argv[0] = argv[argc - 1];\n+\treturn run_command_v_opt(child_argv, RUN_USING_SHELL);\n+}\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276904","messageId":"66a33c0f9dc0619c808cd604c1c061fabc963110.1453911367.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453911367.git.johannes.schindelin@gmx.de","subject":"[PATCH v3 09/20] mingw: accomodate t0060-path-utils for MSYS2","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-27T16:19:40Z","receivedAt":"2016-01-27T16:19:40Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"On Windows, there are no POSIX paths, only Windows ones (an absolute\nWindows path looks like \"C:\\Program Files\\Git\\ReleaseNotes.html\", under\nmost circumstances, forward slashes are also allowed and synonymous to\nbackslashes).\n\nSo when a POSIX shell (such as MSYS2's Bash, which is used by Git for\nWindows to execute all those shell scripts that are part of Git) passes\na POSIX path to test-path-utils.exe (which is not POSIX-aware), the path\nis translated into a Windows path. For example, /etc/profile becomes\nC:/Program Files/Git/etc/profile.\n\nThis path translation poses a problem when passing the root directory as\nparameter to test-path-utils.exe, as it is not well defined whether the\ntranslated root directory should end in a slash or not. MSys1 stripped\nthe trailing slash, but MSYS2 does not.\n\nOriginally, the Git for Windows project patched MSYS2's runtime to\naccomodate Git's regression test, but we really should do it the other\nway round.\n\nTo work with both of MSys1's and MSYS2's behaviors, we simply test what\nthe current system does in the beginning of t0060-path-utils.sh and then\nadjust the expected longest ancestor length accordingly.\n\nIt looks quite a bit tricky what we actually do in this patch: first, we\nadjust the expected length for the trailing slash we did not originally\nexpect (subtracting one). So far, so good.\n\nBut now comes the part where things work in a surprising way: when the\nexpected length was 0, the prefix to match is the root directory. If the\nroot directory is converted into a path with a trailing slash, however,\nwe know that the logic in longest_ancestor_length() cannot match: to\navoid partial matches of the last directory component, it verifies that\nthe character after the matching prefix is a slash (but because the\nslash was part of the matching prefix, the next character cannot be a\nslash). So the return value is -1. Alas, this is exactly what the\nexpected length is after subtracting the value of $rootslash! So we skip\nadding the $rootoff value in that case (and only in that case).\n\nDirectories other than the root directory are handled fine (as they are\nspecified without a trailing slash, something not possible for the root\ndirectory, and MSYS2 converts them into Windows paths that also lack\ntrailing slashes), therefore we do not need any more special handling.\n\nThanks to Ray Donnelly for his patient help with this issue.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t0060-path-utils.sh | 9 +++++++++\n 1 file changed, 9 insertions(+)\n\ndiff --git a/t/t0060-path-utils.sh b/t/t0060-path-utils.sh\nindex f0152a7..8532a02 100755\n--- a/t/t0060-path-utils.sh\n+++ b/t/t0060-path-utils.sh\n@@ -36,12 +36,21 @@ if test $rootoff = 2; then\n \trootoff=\t# we are on Unix\n else\n \trootoff=$(($rootoff-1))\n+\t# In MSYS2, the root directory \"/\" is translated into a Windows\n+\t# directory *with* trailing slash. Let's test for that and adjust\n+\t# our expected longest ancestor length accordingly.\n+\tcase \"$(test-path-utils print_path /)\" in\n+\t*/) rootslash=1;;\n+\t*) rootslash=0;;\n+\tesac\n fi\n \n ancestor() {\n \t# We do some math with the expected ancestor length.\n \texpected=$3\n \tif test -n \"$rootoff\" && test \"x$expected\" != x-1; then\n+\t\texpected=$(($expected-$rootslash))\n+\t\ttest $expected -lt 0 ||\n \t\texpected=$(($expected+$rootoff))\n \tfi\n \ttest_expect_success \"longest ancestor: $1 $2 => $expected\" \\\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276907","messageId":"8d21d835151c2b8ce4d8897a3fffaddba411959b.1453911367.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453911367.git.johannes.schindelin@gmx.de","subject":"[PATCH v3 10/20] mingw: disable mkfifo-based tests","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-27T16:19:43Z","receivedAt":"2016-01-27T16:19:43Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"MSYS2 (the POSIX emulation layer used by Git for Windows' Bash) actually\nhas a working mkfifo. The only problem is that it is only emulating\nnamed pipes through the MSYS2 runtime; The Win32 API has no idea about\nnamed pipes, hence the Git executable cannot access those pipes either.\n\nThe symptom is that Git fails with a '<name>: No such file or directory'\nbecause MSYS2 emulates named pipes through special-crafted '.lnk' files.\n\nThe solution is to tell the test suite explicitly that we cannot use\nnamed pipes when we want to test on Windows.\n\nThis lets t4056-diff-order.sh, t9010-svn-fe.sh and t9300-fast-import.sh\npass.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/test-lib.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex bd4b02e..1470c8d 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -998,7 +998,7 @@ test_i18ngrep () {\n test_lazy_prereq PIPE '\n \t# test whether the filesystem supports FIFOs\n \tcase $(uname -s) in\n-\tCYGWIN*)\n+\tCYGWIN*|MINGW*)\n \t\tfalse\n \t\t;;\n \t*)\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276905","messageId":"35b05b7e0d01bf550b698d3c6ecc577eb80d4149.1453911367.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453911367.git.johannes.schindelin@gmx.de","subject":"[PATCH v3 11/20] tests: turn off git-daemon tests if FIFOs are not available","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-27T16:19:48Z","receivedAt":"2016-01-27T16:19:48Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"The Git daemon tests create a FIFO first thing and will hang if said\nFIFO is not available.\n\nThis is a problem with Git for Windows, where `mkfifo` is an MSYS2\nprogram that leverages MSYS2's POSIX emulation layer, but\n`git-daemon.exe` is a MINGW program that has not the first clue about\nthat POSIX emulation layer and therefore blinks twice when it sees\nMSYS2's emulated FIFOs and then just stares into space.\n\nThis lets t5570-git-daemon.sh and t5811-proto-disable-git.sh pass.\n\nSigned-off-by: Stepan Kasal <kasal@ucw.cz>\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/lib-git-daemon.sh | 5 +++++\n 1 file changed, 5 insertions(+)\n\ndiff --git a/t/lib-git-daemon.sh b/t/lib-git-daemon.sh\nindex bc4b341..9b1271c 100644\n--- a/t/lib-git-daemon.sh\n+++ b/t/lib-git-daemon.sh\n@@ -23,6 +23,11 @@ then\n \ttest_done\n fi\n \n+if ! test_have_prereq PIPE\n+then\n+\ttest_skip_or_die $GIT_TEST_GIT_DAEMON \"file system does not support FIFOs\"\n+fi\n+\n LIB_GIT_DAEMON_PORT=${LIB_GIT_DAEMON_PORT-${this_test#t}}\n \n GIT_DAEMON_PID=\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276908","messageId":"a5809c91c0afb70955a70c9d2371c15ba6c79c39.1453911367.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453911367.git.johannes.schindelin@gmx.de","subject":"[PATCH v3 12/20] mingw: skip test in t1508 that fails due to path conversion","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-27T16:19:52Z","receivedAt":"2016-01-27T16:19:52Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"In Git for Windows, the MSYS2 POSIX emulation layer used by the Bash\nconverts command-line arguments that looks like they refer to a POSIX\npath containing a file list (i.e. @<absolute-path>) into a Windows path\nequivalent when calling non-MSYS2 executables, such as git.exe.\n\nLet's just skip the test that uses the parameter `@/at-test` that\nconfuses the MSYS2 runtime.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t1508-at-combinations.sh | 6 +++++-\n 1 file changed, 5 insertions(+), 1 deletion(-)\n\ndiff --git a/t/t1508-at-combinations.sh b/t/t1508-at-combinations.sh\nindex 078e119..4a9964e 100755\n--- a/t/t1508-at-combinations.sh\n+++ b/t/t1508-at-combinations.sh\n@@ -35,7 +35,10 @@ test_expect_success 'setup' '\n \tgit checkout -b upstream-branch &&\n \ttest_commit upstream-one &&\n \ttest_commit upstream-two &&\n-\tgit checkout -b @/at-test &&\n+\tif test_have_prereq !MINGW\n+\tthen\n+\t\tgit checkout -b @/at-test\n+\tfi &&\n \tgit checkout -b @@/at-test &&\n \tgit checkout -b @at-test &&\n \tgit checkout -b old-branch &&\n@@ -64,6 +67,7 @@ check \"@{-1}@{u}@{1}\" commit master-one\n check \"@\" commit new-two\n check \"@@{u}\" ref refs/heads/upstream-branch\n check \"@@/at-test\" ref refs/heads/@@/at-test\n+test_have_prereq MINGW ||\n check \"@/at-test\" ref refs/heads/@/at-test\n check \"@at-test\" ref refs/heads/@at-test\n nonsense \"@{u}@{-1}\"\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276915","messageId":"6a2a483a09b56ed4e06ac8a19f73cc37c7a8b0d4.1453911367.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453911367.git.johannes.schindelin@gmx.de","subject":"[PATCH v3 13/20] mingw: fix t9700's assumption about directory separators","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-27T16:19:56Z","receivedAt":"2016-01-27T16:19:56Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"This test assumed that there is only one directory separator (the\nforward slash), not two equivalent directory separators.\nHowever, on Windows, the back slash and the forward slash *are*\nequivalent.\n\nLet's paper over this issue by converting the backward slashes to\nforward ones in the test that fails with MSYS2 otherwise.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t9700/test.pl | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t9700/test.pl b/t/t9700/test.pl\nindex 1140767..7e8c40b 100755\n--- a/t/t9700/test.pl\n+++ b/t/t9700/test.pl\n@@ -33,7 +33,7 @@ is($r->config_int(\"test.int\"), 2048, \"config_int: integer\");\n is($r->config_int(\"test.nonexistent\"), undef, \"config_int: nonexistent\");\n ok($r->config_bool(\"test.booltrue\"), \"config_bool: true\");\n ok(!$r->config_bool(\"test.boolfalse\"), \"config_bool: false\");\n-is($r->config_path(\"test.path\"), $r->config(\"test.pathexpanded\"),\n+is($r->config_path(\"test.path\") =~ s/\\\\/\\//gr, $r->config(\"test.pathexpanded\"),\n    \"config_path: ~/foo expansion\");\n is_deeply([$r->config_path(\"test.pathmulti\")], [\"foo\", \"bar\"],\n    \"config_path: multiple values\");\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276909","messageId":"c39411306f1341265293d0b6c3de592a764f0392.1453911367.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453911367.git.johannes.schindelin@gmx.de","subject":"[PATCH v3 14/20] mingw: work around pwd issues in the tests","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-27T16:19:59Z","receivedAt":"2016-01-27T16:19:59Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"In Git for Windows' SDK, the tests are run using a Bash that relies on\nthe POSIX emulation layer MSYS2 (itself a friendly fork of Cygwin). As\nsuch, paths in tests can be POSIX paths. As soon as those paths are\npassed to git.exe (which does *not* use the POSIX emulation layer),\nthose paths are converted into Windows paths, though. This happens\nfor command-line parameters, but not when reading, say, config variables.\n\nTo help with that, the `pwd` command is overridden to return the Windows\npath of the current working directory when testing Git on Windows.\n\nHowever, when talking to anything using the POSIX emulation layer, it is\nreally much better to use POSIX paths because Windows paths contain a\ncolon after the drive letter that will easily be mistaken for the common\nseparator in path lists.\n\nSo let's just use the $PWD variable when the POSIX path is needed.\n\nThis lets t7800-difftool.sh, t9400-git-cvsserver-server.sh,\nt9402-git-cvsserver-refs.sh and t9401-git-cvsserver-crlf.sh pass in Git\nfor Windows' SDK.\n\nNote: the cvsserver tests require not only the `cvs` package (install\nit into Git for Windows' SDK via `pacman -S cvs`) but also the Perl\nSQLite bindings (install them into Git for Windows' SDK via\n`cpan DBD::SQLite`).\n\nThis patch is based on earlier work by 마누엘 and Karsten Blees.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t7800-difftool.sh             | 14 +++++++-------\n t/t9400-git-cvsserver-server.sh |  6 +++---\n t/t9401-git-cvsserver-crlf.sh   |  6 +++---\n t/t9402-git-cvsserver-refs.sh   |  6 +++---\n 4 files changed, 16 insertions(+), 16 deletions(-)\n\ndiff --git a/t/t7800-difftool.sh b/t/t7800-difftool.sh\nindex ec8bc8c..4e713f7 100755\n--- a/t/t7800-difftool.sh\n+++ b/t/t7800-difftool.sh\n@@ -430,11 +430,11 @@ EOF\n test_expect_success PERL,SYMLINKS 'difftool --dir-diff --symlink without unstaged changes' '\n \tcat >expect <<-EOF &&\n \tfile\n-\t$(pwd)/file\n+\t$PWD/file\n \tfile2\n-\t$(pwd)/file2\n+\t$PWD/file2\n \tsub/sub\n-\t$(pwd)/sub/sub\n+\t$PWD/sub/sub\n \tEOF\n \tgit difftool --dir-diff --symlink \\\n \t\t--extcmd \"./.git/CHECK_SYMLINKS\" branch HEAD &&\n@@ -448,14 +448,14 @@ EOF\n run_dir_diff_test 'difftool --dir-diff syncs worktree with unstaged change' '\n \ttest_when_finished git reset --hard &&\n \techo \"orig content\" >file &&\n-\tgit difftool -d $symlinks --extcmd \"$(pwd)/modify-right-file\" branch &&\n+\tgit difftool -d $symlinks --extcmd \"$PWD/modify-right-file\" branch &&\n \techo \"new content\" >expect &&\n \ttest_cmp expect file\n '\n \n run_dir_diff_test 'difftool --dir-diff syncs worktree without unstaged change' '\n \ttest_when_finished git reset --hard &&\n-\tgit difftool -d $symlinks --extcmd \"$(pwd)/modify-right-file\" branch &&\n+\tgit difftool -d $symlinks --extcmd \"$PWD/modify-right-file\" branch &&\n \techo \"new content\" >expect &&\n \ttest_cmp expect file\n '\n@@ -466,7 +466,7 @@ EOF\n \n test_expect_success PERL 'difftool --no-symlinks does not overwrite working tree file ' '\n \techo \"orig content\" >file &&\n-\tgit difftool --dir-diff --no-symlinks --extcmd \"$(pwd)/modify-file\" branch &&\n+\tgit difftool --dir-diff --no-symlinks --extcmd \"$PWD/modify-file\" branch &&\n \techo \"new content\" >expect &&\n \ttest_cmp expect file\n '\n@@ -482,7 +482,7 @@ test_expect_success PERL 'difftool --no-symlinks detects conflict ' '\n \t\tTMPDIR=$TRASH_DIRECTORY &&\n \t\texport TMPDIR &&\n \t\techo \"orig content\" >file &&\n-\t\ttest_must_fail git difftool --dir-diff --no-symlinks --extcmd \"$(pwd)/modify-both-files\" branch &&\n+\t\ttest_must_fail git difftool --dir-diff --no-symlinks --extcmd \"$PWD/modify-both-files\" branch &&\n \t\techo \"wt content\" >expect &&\n \t\ttest_cmp expect file &&\n \t\techo \"tmp content\" >expect &&\ndiff --git a/t/t9400-git-cvsserver-server.sh b/t/t9400-git-cvsserver-server.sh\nindex 6146c3f..d708cbf 100755\n--- a/t/t9400-git-cvsserver-server.sh\n+++ b/t/t9400-git-cvsserver-server.sh\n@@ -25,11 +25,11 @@ perl -e 'use DBI; use DBD::SQLite' >/dev/null 2>&1 || {\n     test_done\n }\n \n-WORKDIR=$(pwd)\n-SERVERDIR=$(pwd)/gitcvs.git\n+WORKDIR=$PWD\n+SERVERDIR=$PWD/gitcvs.git\n git_config=\"$SERVERDIR/config\"\n CVSROOT=\":fork:$SERVERDIR\"\n-CVSWORK=\"$(pwd)/cvswork\"\n+CVSWORK=\"$PWD/cvswork\"\n CVS_SERVER=git-cvsserver\n export CVSROOT CVS_SERVER\n \ndiff --git a/t/t9401-git-cvsserver-crlf.sh b/t/t9401-git-cvsserver-crlf.sh\nindex 5a4ed28..f324b9f 100755\n--- a/t/t9401-git-cvsserver-crlf.sh\n+++ b/t/t9401-git-cvsserver-crlf.sh\n@@ -74,11 +74,11 @@ perl -e 'use DBI; use DBD::SQLite' >/dev/null 2>&1 || {\n }\n \n unset GIT_DIR GIT_CONFIG\n-WORKDIR=$(pwd)\n-SERVERDIR=$(pwd)/gitcvs.git\n+WORKDIR=$PWD\n+SERVERDIR=$PWD/gitcvs.git\n git_config=\"$SERVERDIR/config\"\n CVSROOT=\":fork:$SERVERDIR\"\n-CVSWORK=\"$(pwd)/cvswork\"\n+CVSWORK=\"$PWD/cvswork\"\n CVS_SERVER=git-cvsserver\n export CVSROOT CVS_SERVER\n \ndiff --git a/t/t9402-git-cvsserver-refs.sh b/t/t9402-git-cvsserver-refs.sh\nindex d00df08..6d2d3c8 100755\n--- a/t/t9402-git-cvsserver-refs.sh\n+++ b/t/t9402-git-cvsserver-refs.sh\n@@ -82,11 +82,11 @@ perl -e 'use DBI; use DBD::SQLite' >/dev/null 2>&1 || {\n }\n \n unset GIT_DIR GIT_CONFIG\n-WORKDIR=$(pwd)\n-SERVERDIR=$(pwd)/gitcvs.git\n+WORKDIR=$PWD\n+SERVERDIR=$PWD/gitcvs.git\n git_config=\"$SERVERDIR/config\"\n CVSROOT=\":fork:$SERVERDIR\"\n-CVSWORK=\"$(pwd)/cvswork\"\n+CVSWORK=\"$PWD/cvswork\"\n CVS_SERVER=git-cvsserver\n export CVSROOT CVS_SERVER\n \n-- \n2.7.0.windows.1.7.g55a05c8\n\n"},{"id":"276914","messageId":"76f9af37dd63413fad5b47635a6bd82c2f7e9011.1453911367.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453911367.git.johannes.schindelin@gmx.de","subject":"[PATCH v3 15/20] Avoid absolute path in t0008","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-27T16:20:03Z","receivedAt":"2016-01-27T16:20:03Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Pat Thoyts <patthoyts@users.sourceforge.net>\n\nThe colon is used by check-ignore to separate paths from other output\nvalues. If we use an absolute path, however, on Windows it will be\nconverted into a Windows path that very much contains a colon.\n\nIt is actually not at all necessary to make the path of the global\nexcludes absolute, so let's just not even do that.\n\nBased on suggestions by Karsten Blees and Junio Hamano.\n\nSuggested-by: Karsten Blees <karsten.blees@gmail.com>\nSigned-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t0008-ignores.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t0008-ignores.sh b/t/t0008-ignores.sh\nindex 4ef5ed4..89544dd 100755\n--- a/t/t0008-ignores.sh\n+++ b/t/t0008-ignores.sh\n@@ -5,7 +5,7 @@ test_description=check-ignore\n . ./test-lib.sh\n \n init_vars () {\n-\tglobal_excludes=\"$(pwd)/global-excludes\"\n+\tglobal_excludes=\"global-excludes\"\n }\n \n enable_global_excludes () {\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276910","messageId":"4c963d60edda50c110ba01150d745a2b8ebc66e0.1453911367.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453911367.git.johannes.schindelin@gmx.de","subject":"[PATCH v3 16/20] mingw: mark t9100's test cases with appropriate prereqs","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-27T16:20:08Z","receivedAt":"2016-01-27T16:20:08Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Many a test requires either POSIXPERM (to change the executable bit) or\nSYMLINKS, and neither are available on Windows.\n\nThis lets t9100-git-svn-basic.sh pass in Git for Windows' SDK.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t9100-git-svn-basic.sh | 18 +++++++++---------\n 1 file changed, 9 insertions(+), 9 deletions(-)\n\ndiff --git a/t/t9100-git-svn-basic.sh b/t/t9100-git-svn-basic.sh\nindex 258d9b8..56acc1e 100755\n--- a/t/t9100-git-svn-basic.sh\n+++ b/t/t9100-git-svn-basic.sh\n@@ -30,8 +30,7 @@ test_expect_success \\\n \t\techo \"deep dir\" >dir/a/b/c/d/e/file &&\n \t\tmkdir bar &&\n \t\techo \"zzz\" >bar/zzz &&\n-\t\techo \"#!/bin/sh\" >exec.sh &&\n-\t\tchmod +x exec.sh &&\n+\t\twrite_script exec.sh </dev/null &&\n \t\tsvn_cmd import -m \"import for git svn\" . \"$svnrepo\" >/dev/null\n \t) &&\n \trm -rf import &&\n@@ -117,7 +116,7 @@ test_expect_success \"$name\" '\n \n \n name='remove executable bit from a file'\n-test_expect_success \"$name\" '\n+test_expect_success POSIXPERM \"$name\" '\n \trm -f \"$GIT_DIR\"/index &&\n \tgit checkout -f -b mybranch5 ${remotes_git_svn} &&\n \tchmod -x exec.sh &&\n@@ -130,7 +129,7 @@ test_expect_success \"$name\" '\n \n \n name='add executable bit back file'\n-test_expect_success \"$name\" '\n+test_expect_success POSIXPERM \"$name\" '\n \tchmod +x exec.sh &&\n \tgit update-index exec.sh &&\n \tgit commit -m \"$name\" &&\n@@ -141,7 +140,7 @@ test_expect_success \"$name\" '\n \n \n name='executable file becomes a symlink to file'\n-test_expect_success \"$name\" '\n+test_expect_success SYMLINKS \"$name\" '\n \trm exec.sh &&\n \tln -s file exec.sh &&\n \tgit update-index exec.sh &&\n@@ -153,7 +152,7 @@ test_expect_success \"$name\" '\n \n name='new symlink is added to a file that was also just made executable'\n \n-test_expect_success \"$name\" '\n+test_expect_success POSIXPERM,SYMLINKS \"$name\" '\n \tchmod +x file &&\n \tln -s file exec-2.sh &&\n \tgit update-index --add file exec-2.sh &&\n@@ -165,7 +164,7 @@ test_expect_success \"$name\" '\n \ttest -h \"$SVN_TREE\"/exec-2.sh'\n \n name='modify a symlink to become a file'\n-test_expect_success \"$name\" '\n+test_expect_success POSIXPERM,SYMLINKS \"$name\" '\n \techo git help >help &&\n \trm exec-2.sh &&\n \tcp help exec-2.sh &&\n@@ -181,7 +180,8 @@ test_expect_success \"$name\" '\n name=\"commit with UTF-8 message: locale: $GIT_SVN_LC_ALL\"\n LC_ALL=\"$GIT_SVN_LC_ALL\"\n export LC_ALL\n-test_expect_success UTF8 \"$name\" \"\n+# This test relies on the previous test, hence requires POSIXPERM,SYMLINKS\n+test_expect_success UTF8,POSIXPERM,SYMLINKS \"$name\" \"\n \techo '# hello' >> exec-2.sh &&\n \tgit update-index exec-2.sh &&\n \tgit commit -m 'éï∏' &&\n@@ -214,7 +214,7 @@ tree d667270a1f7b109f5eb3aaea21ede14b56bfdd6e\n tree 8f51f74cf0163afc9ad68a4b1537288c4558b5a4\n EOF\n \n-test_expect_success \"$name\" \"test_cmp a expected\"\n+test_expect_success POSIXPERM,SYMLINKS \"$name\" \"test_cmp a expected\"\n \n test_expect_success 'exit if remote refs are ambigious' \"\n         git config --add svn-remote.svn.fetch \\\n-- \n2.7.0.windows.1.7.g55a05c8\n\n"},{"id":"276911","messageId":"e691d638d1099e1146a4550034c925983a2caecc.1453911367.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453911367.git.johannes.schindelin@gmx.de","subject":"[PATCH v3 17/20] mingw: avoid illegal filename in t9118","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-27T16:20:11Z","receivedAt":"2016-01-27T16:20:11Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"On Windows' file systems, file names with trailing dots are forbidden.\nThe POSIX emulation layer used by Git for Windows' Subversion emulates\nthose file names, therefore the test adding the file would actually\nsucceed, but when we would ask git.exe (which does not leverage the\nPOSIX emulation layer) to check out the tree, it would fail.\n\nLet's just guard the test using a filename that is illegal on Windows\nby the MINGW prereq.\n\nThis lets t9118-git-svn-funky-branch-names.sh pass in Git for Windows'\nSDK.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t9118-git-svn-funky-branch-names.sh | 12 +++++++++---\n 1 file changed, 9 insertions(+), 3 deletions(-)\n\ndiff --git a/t/t9118-git-svn-funky-branch-names.sh b/t/t9118-git-svn-funky-branch-names.sh\nindex a221915..ecb1fed 100755\n--- a/t/t9118-git-svn-funky-branch-names.sh\n+++ b/t/t9118-git-svn-funky-branch-names.sh\n@@ -23,8 +23,11 @@ test_expect_success 'setup svnrepo' '\n \t              \"$svnrepo/pr ject/branches/$scary_uri\" &&\n \tsvn_cmd cp -m \"leading dot\" \"$svnrepo/pr ject/trunk\" \\\n \t\t\t\"$svnrepo/pr ject/branches/.leading_dot\" &&\n-\tsvn_cmd cp -m \"trailing dot\" \"$svnrepo/pr ject/trunk\" \\\n-\t\t\t\"$svnrepo/pr ject/branches/trailing_dot.\" &&\n+\tif test_have_prereq !MINGW\n+\tthen\n+\t\tsvn_cmd cp -m \"trailing dot\" \"$svnrepo/pr ject/trunk\" \\\n+\t\t\t\"$svnrepo/pr ject/branches/trailing_dot.\"\n+\tfi &&\n \tsvn_cmd cp -m \"trailing .lock\" \"$svnrepo/pr ject/trunk\" \\\n \t\t\t\"$svnrepo/pr ject/branches/trailing_dotlock.lock\" &&\n \tsvn_cmd cp -m \"reflog\" \"$svnrepo/pr ject/trunk\" \\\n@@ -45,7 +48,10 @@ test_expect_success 'test clone with funky branch names' '\n \t\tgit rev-parse \"refs/remotes/origin/more%20fun%20plugin!\" &&\n \t\tgit rev-parse \"refs/remotes/origin/$scary_ref\" &&\n \t\tgit rev-parse \"refs/remotes/origin/%2Eleading_dot\" &&\n-\t\tgit rev-parse \"refs/remotes/origin/trailing_dot%2E\" &&\n+\t\tif test_have_prereq !MINGW\n+\t\tthen\n+\t\t\tgit rev-parse \"refs/remotes/origin/trailing_dot%2E\"\n+\t\tfi &&\n \t\tgit rev-parse \"refs/remotes/origin/trailing_dotlock%2Elock\" &&\n \t\tgit rev-parse \"refs/remotes/origin/$non_reflog\"\n \t)\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276912","messageId":"05b8e560c0e4d10eea9f945e8e14029cb1b3e54b.1453911367.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453911367.git.johannes.schindelin@gmx.de","subject":"[PATCH v3 18/20] mingw: handle the missing POSIXPERM prereq in t9124","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-27T16:20:15Z","receivedAt":"2016-01-27T16:20:15Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"On Windows, the permission system works completely differently than\nexpected by some of the tests. So let's make sure that we do not test\nPOSIX functionality on Windows.\n\nThis lets t9124-git-svn-dcommit-auto-props.sh pass in Git for Windows'\nSDK.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t9124-git-svn-dcommit-auto-props.sh | 16 ++++++++++------\n 1 file changed, 10 insertions(+), 6 deletions(-)\n\ndiff --git a/t/t9124-git-svn-dcommit-auto-props.sh b/t/t9124-git-svn-dcommit-auto-props.sh\nindex aa841e1..9f7231d 100755\n--- a/t/t9124-git-svn-dcommit-auto-props.sh\n+++ b/t/t9124-git-svn-dcommit-auto-props.sh\n@@ -34,8 +34,7 @@ test_expect_success 'enable auto-props config' '\n '\n \n test_expect_success 'add files matching auto-props' '\n-\techo \"#!$SHELL_PATH\" >exec1.sh &&\n-\tchmod +x exec1.sh &&\n+\twrite_script exec1.sh </dev/null &&\n \techo \"hello\" >hello.txt &&\n \techo bar >bar &&\n \tgit add exec1.sh hello.txt bar &&\n@@ -48,8 +47,7 @@ test_expect_success 'disable auto-props config' '\n '\n \n test_expect_success 'add files matching disabled auto-props' '\n-\techo \"#$SHELL_PATH\" >exec2.sh &&\n-\tchmod +x exec2.sh &&\n+\twrite_script exec2.sh </dev/null &&\n \techo \"world\" >world.txt &&\n \techo zot >zot &&\n \tgit add exec2.sh world.txt zot &&\n@@ -65,7 +63,10 @@ test_expect_success 'check resulting svn repository' '\n \tcd svnrepo &&\n \n \t# Check properties from first commit.\n-\ttest \"x$(svn_cmd propget svn:executable exec1.sh)\" = \"x*\" &&\n+\tif test_have_prereq POSIXPERM\n+\tthen\n+\t\ttest \"x$(svn_cmd propget svn:executable exec1.sh)\" = \"x*\"\n+\tfi &&\n \ttest \"x$(svn_cmd propget svn:mime-type exec1.sh)\" = \\\n \t     \"xapplication/x-shellscript\" &&\n \ttest \"x$(svn_cmd propget svn:mime-type hello.txt)\" = \"xtext/plain\" &&\n@@ -73,7 +74,10 @@ test_expect_success 'check resulting svn repository' '\n \ttest \"x$(svn_cmd propget svn:mime-type bar)\" = \"x\" &&\n \n \t# Check properties from second commit.\n-\ttest \"x$(svn_cmd propget svn:executable exec2.sh)\" = \"x*\" &&\n+\tif test_have_prereq POSIXPERM\n+\tthen\n+\t\ttest \"x$(svn_cmd propget svn:executable exec2.sh)\" = \"x*\"\n+\tfi &&\n \ttest \"x$(svn_cmd propget svn:mime-type exec2.sh)\" = \"x\" &&\n \ttest \"x$(svn_cmd propget svn:mime-type world.txt)\" = \"x\" &&\n \ttest \"x$(svn_cmd propget svn:eol-style world.txt)\" = \"x\" &&\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276913","messageId":"83a2c2fac0a8737586b4d3c1dcca6fc61de7bb96.1453911367.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453911367.git.johannes.schindelin@gmx.de","subject":"[PATCH v3 19/20] mingw: skip a test in t9130 that cannot pass on Windows","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-27T16:20:22Z","receivedAt":"2016-01-27T16:20:22Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"On Windows, Git itself has no clue about POSIX paths, but its shell\nscripts do. In this instance, we get mixed paths as a result, and when\ncomparing the path of the author file, we get a mismatch that is\nentirely due to the POSIX path vs Windows path clash.\n\nLet's just skip this test so that t9130-git-svn-authors-file.sh passes\nin Git for Windows' SDK.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t9130-git-svn-authors-file.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t9130-git-svn-authors-file.sh b/t/t9130-git-svn-authors-file.sh\nindex d306b77..4126481 100755\n--- a/t/t9130-git-svn-authors-file.sh\n+++ b/t/t9130-git-svn-authors-file.sh\n@@ -91,7 +91,7 @@ test_expect_success 'fetch continues after authors-file is fixed' '\n \t)\n \t'\n \n-test_expect_success 'fresh clone with svn.authors-file in config' '\n+test_expect_success !MINGW 'fresh clone with svn.authors-file in config' '\n \t(\n \t\trm -r \"$GIT_DIR\" &&\n \t\ttest x = x\"$(git config svn.authorsfile)\" &&\n-- \n2.7.0.windows.1.7.g55a05c8\n"},{"id":"276916","messageId":"c94cd23f349a48b7c461b16123fa18733f6a2d44.1453911367.git.johannes.schindelin@gmx.de","threadId":"41254","inReplyTo":"cover.1453911367.git.johannes.schindelin@gmx.de","subject":"[PATCH v3 20/20] mingw: do not bother to test funny file names","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-27T16:20:26Z","receivedAt":"2016-01-27T16:20:26Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"MSYS2 actually allows to create files or directories whose names contain\ntabs, newlines or colors, even if plain Win32 API cannot access them.\nAs we are using an MSYS2 bash to run the tests, such files or\ndirectories are created successfully, but Git itself has no chance to\nwork with them because it is a regular Windows program, hence limited by\nthe Win32 API.\n\nWith this change, on Windows otherwise failing tests in\nt3300-funny-names.sh, t3600-rm.sh, t3703-add-magic-pathspec.sh,\nt3902-quoted.sh, t4016-diff-quote.sh, t4135-apply-weird-filenames.sh,\nt9200-git-cvsexportcommit.sh, and t9903-bash-prompt.sh are skipped.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t3300-funny-names.sh           | 1 +\n t/t3600-rm.sh                    | 2 +-\n t/t3703-add-magic-pathspec.sh    | 2 +-\n t/t3902-quoted.sh                | 1 +\n t/t4016-diff-quote.sh            | 1 +\n t/t4135-apply-weird-filenames.sh | 3 ++-\n t/t9200-git-cvsexportcommit.sh   | 2 +-\n t/t9903-bash-prompt.sh           | 2 +-\n 8 files changed, 9 insertions(+), 5 deletions(-)\n\ndiff --git a/t/t3300-funny-names.sh b/t/t3300-funny-names.sh\nindex 9a146f1..04de03c 100755\n--- a/t/t3300-funny-names.sh\n+++ b/t/t3300-funny-names.sh\n@@ -13,6 +13,7 @@ tree, index, and tree objects.\n \n HT='\t'\n \n+test_have_prereq MINGW ||\n echo 2>/dev/null > \"Name with an${HT}HT\"\n if ! test -f \"Name with an${HT}HT\"\n then\ndiff --git a/t/t3600-rm.sh b/t/t3600-rm.sh\nindex 2e47a2b..d046d98 100755\n--- a/t/t3600-rm.sh\n+++ b/t/t3600-rm.sh\n@@ -14,7 +14,7 @@ test_expect_success \\\n      git add -- foo bar baz 'space embedded' -q &&\n      git commit -m 'add normal files'\"\n \n-if touch -- 'tab\tembedded' 'newline\n+if test_have_prereq !MINGW && touch -- 'tab\tembedded' 'newline\n embedded' 2>/dev/null\n then\n \ttest_set_prereq FUNNYNAMES\ndiff --git a/t/t3703-add-magic-pathspec.sh b/t/t3703-add-magic-pathspec.sh\nindex 5115de7..3ef525a 100755\n--- a/t/t3703-add-magic-pathspec.sh\n+++ b/t/t3703-add-magic-pathspec.sh\n@@ -38,7 +38,7 @@ cat >expected <<EOF\n add 'sub/foo'\n EOF\n \n-if mkdir \":\" 2>/dev/null\n+if test_have_prereq !MINGW && mkdir \":\" 2>/dev/null\n then\n \ttest_set_prereq COLON_DIR\n fi\ndiff --git a/t/t3902-quoted.sh b/t/t3902-quoted.sh\nindex 892f567..f528008 100755\n--- a/t/t3902-quoted.sh\n+++ b/t/t3902-quoted.sh\n@@ -12,6 +12,7 @@ GN='純'\n HT='\t'\n DQ='\"'\n \n+test_have_prereq MINGW ||\n echo foo 2>/dev/null > \"Name and an${HT}HT\"\n if ! test -f \"Name and an${HT}HT\"\n then\ndiff --git a/t/t4016-diff-quote.sh b/t/t4016-diff-quote.sh\nindex cd543ec..9c48e5c 100755\n--- a/t/t4016-diff-quote.sh\n+++ b/t/t4016-diff-quote.sh\n@@ -13,6 +13,7 @@ P1='pathname\twith HT'\n P2='pathname with SP'\n P3='pathname\n with LF'\n+test_have_prereq !MINGW &&\n echo 2>/dev/null >\"$P1\" && test -f \"$P1\" && rm -f \"$P1\" || {\n \tskip_all='Your filesystem does not allow tabs in filenames'\n \ttest_done\ndiff --git a/t/t4135-apply-weird-filenames.sh b/t/t4135-apply-weird-filenames.sh\nindex bf5dc57..27cb000 100755\n--- a/t/t4135-apply-weird-filenames.sh\n+++ b/t/t4135-apply-weird-filenames.sh\n@@ -19,7 +19,8 @@ test_expect_success 'setup' '\n \n \ttest_when_finished \"rm -f \\\"tab\tembedded.txt\\\"\" &&\n \ttest_when_finished \"rm -f '\\''\\\"quoteembedded\\\".txt'\\''\" &&\n-\tif touch -- \"tab\tembedded.txt\" '\\''\"quoteembedded\".txt'\\''\n+\tif test_have_prereq !MINGW &&\n+\t\ttouch -- \"tab\tembedded.txt\" '\\''\"quoteembedded\".txt'\\''\n \tthen\n \t\ttest_set_prereq FUNNYNAMES\n \tfi\ndiff --git a/t/t9200-git-cvsexportcommit.sh b/t/t9200-git-cvsexportcommit.sh\nindex 812c9cd..5cfb9cf 100755\n--- a/t/t9200-git-cvsexportcommit.sh\n+++ b/t/t9200-git-cvsexportcommit.sh\n@@ -197,7 +197,7 @@ if p=\"Å/goo/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/å/ä/ö\" &&\n then\n \n # This test contains UTF-8 characters\n-test_expect_success \\\n+test_expect_success !MINGW \\\n      'File with non-ascii file name' \\\n      'mkdir -p Å/goo/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/å/ä/ö &&\n       echo Foo >Å/goo/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/å/ä/ö/gårdetsågårdet.txt &&\ndiff --git a/t/t9903-bash-prompt.sh b/t/t9903-bash-prompt.sh\nindex af82049..ffbfa0e 100755\n--- a/t/t9903-bash-prompt.sh\n+++ b/t/t9903-bash-prompt.sh\n@@ -67,7 +67,7 @@ repo_with_newline='repo\n with\n newline'\n \n-if mkdir \"$repo_with_newline\" 2>/dev/null\n+if test_have_prereq !MINGW && mkdir \"$repo_with_newline\" 2>/dev/null\n then\n \ttest_set_prereq FUNNYNAMES\n else\n-- \n2.7.0.windows.1.7.g55a05c8"},{"id":"276917","messageId":"alpine.DEB.2.20.1601271732280.2964@virtualbox","threadId":"41254","inReplyTo":"4c963d60edda50c110ba01150d745a2b8ebc66e0.1453911367.git.johannes.schindelin@gmx.de","subject":"Re: [PATCH v3 16/20] mingw: mark t9100's test cases with appropriate prereqs","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-27T16:33:44Z","receivedAt":"2016-01-27T16:33:44Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Wed, 27 Jan 2016, Johannes Schindelin wrote:\n\n> --8323329-1704809497-1453911609=:2964\n> Content-Type: text/plain; charset=X-UNKNOWN\n\nOh well. I guess I am really too stupid to get this right... Will change\nmy script to call format-patch with the --add-header='Content-Type:\ntext/plain; charset=UTF-8' option to prevent more misery in the future.\n\nSorry,\nDscho\n"},{"id":"276931","messageId":"xmqqzivq7ovu.fsf@gitster.mtv.corp.google.com","threadId":"41254","inReplyTo":"alpine.DEB.2.20.1601270943390.2964@virtualbox","subject":"Re: [PATCH v2 12/19] mingw: skip test in t1508 that fails due to path conversion","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-01-27T20:23:33Z","receivedAt":"2016-01-27T20:23:33Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> Hi Junio,\n>\n> On Tue, 26 Jan 2016, Junio C Hamano wrote:\n>\n>> Johannes Schindelin <johannes.schindelin@gmx.de> writes:\n>> \n>> > @@ -35,7 +35,10 @@ test_expect_success 'setup' '\n>> >  \tgit checkout -b upstream-branch &&\n>> >  \ttest_commit upstream-one &&\n>> >  \ttest_commit upstream-two &&\n>> > -\tgit checkout -b @/at-test &&\n>> > +\tif ! test_have_prereq MINGW\n>> > +\tthen\n>> > +\t\tgit checkout -b @/at-slash\n>> \n>> I presume that this is meant to be \"@/at-test\", not \"@/at-slash\".\n>\n> Oh my. That's what you get for redoing patches from scratch. Sorry about\n> that!\n\nHeh.  That is why it makes me feel uneasy, after asking you to fetch\nfrom me and fix it up, to hear that you will send in a new reroll.\n"},{"id":"276932","messageId":"xmqqvb6e7oub.fsf@gitster.mtv.corp.google.com","threadId":"41254","inReplyTo":"alpine.DEB.2.20.1601270936440.2964@virtualbox","subject":"Re: [PATCH v2 00/19] Let Git's tests pass on Windows","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-01-27T20:24:28Z","receivedAt":"2016-01-27T20:24:28Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> I made a couple of other adjustments anyway, so expect a new iteration\n> shortly. This time cross-checked on Linux.\n\nThanks, will take a look.\n"},{"id":"276960","messageId":"alpine.DEB.2.20.1601280856130.2964@virtualbox","threadId":"41254","inReplyTo":"xmqqzivq7ovu.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH v2 12/19] mingw: skip test in t1508 that fails due to path conversion","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-28T07:58:35Z","receivedAt":"2016-01-28T07:58:35Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Wed, 27 Jan 2016, Junio C Hamano wrote:\n\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> \n> > On Tue, 26 Jan 2016, Junio C Hamano wrote:\n> >\n> >> Johannes Schindelin <johannes.schindelin@gmx.de> writes:\n> >> \n> >> > -\tgit checkout -b @/at-test &&\n> >> > +\tif ! test_have_prereq MINGW\n> >> > +\tthen\n> >> > +\t\tgit checkout -b @/at-slash\n> >> \n> >> I presume that this is meant to be \"@/at-test\", not \"@/at-slash\".\n> >\n> > Oh my. That's what you get for redoing patches from scratch. Sorry about\n> > that!\n> \n> Heh.  That is why it makes me feel uneasy, after asking you to fetch\n> from me and fix it up, to hear that you will send in a new reroll.\n\nI should have mentioned that I did rebase what your pu carries onto my\nchanges locally and found that the only differences were the consistency\ntweaks (such as not adding the empty line pointed out by Eric, and such as\nusing !MINGW through-out).\n\nCiao,\nDscho\n"},{"id":"276963","messageId":"CAPig+cRXV-nv1ZZv1MrujdF3YfZMgwusTcBHAXnyCRaYyXmRWg@mail.gmail.com","threadId":"41254","inReplyTo":"35b05b7e0d01bf550b698d3c6ecc577eb80d4149.1453911367.git.johannes.schindelin@gmx.de","subject":"Re: [PATCH v3 11/20] tests: turn off git-daemon tests if FIFOs are not available","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2016-01-28T08:21:56Z","receivedAt":"2016-01-28T08:21:56Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Wed, Jan 27, 2016 at 11:19 AM, Johannes Schindelin\n<johannes.schindelin@gmx.de> wrote:\n> The Git daemon tests create a FIFO first thing and will hang if said\n> FIFO is not available.\n>\n> This is a problem with Git for Windows, where `mkfifo` is an MSYS2\n> program that leverages MSYS2's POSIX emulation layer, but\n> `git-daemon.exe` is a MINGW program that has not the first clue about\n> that POSIX emulation layer and therefore blinks twice when it sees\n> MSYS2's emulated FIFOs and then just stares into space.\n>\n> This lets t5570-git-daemon.sh and t5811-proto-disable-git.sh pass.\n>\n> Signed-off-by: Stepan Kasal <kasal@ucw.cz>\n> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> ---\n> diff --git a/t/lib-git-daemon.sh b/t/lib-git-daemon.sh\n> @@ -23,6 +23,11 @@ then\n> +if ! test_have_prereq PIPE\n\nMaybe:\n\n    if test_have_prereq !PIPE\n\n?\n\n> +then\n> +       test_skip_or_die $GIT_TEST_GIT_DAEMON \"file system does not support FIFOs\"\n> +fi\n> +\n>  LIB_GIT_DAEMON_PORT=${LIB_GIT_DAEMON_PORT-${this_test#t}}\n>\n>  GIT_DAEMON_PID=\n> --\n> 2.7.0.windows.1.7.g55a05c8\n"},{"id":"276965","messageId":"alpine.DEB.2.20.1601280939170.2964@virtualbox","threadId":"41254","inReplyTo":"CAPig+cRXV-nv1ZZv1MrujdF3YfZMgwusTcBHAXnyCRaYyXmRWg@mail.gmail.com","subject":"Re: [PATCH v3 11/20] tests: turn off git-daemon tests if FIFOs are not available","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-28T08:40:43Z","receivedAt":"2016-01-28T08:40:43Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Eric,\n\nOn Thu, 28 Jan 2016, Eric Sunshine wrote:\n\n> On Wed, Jan 27, 2016 at 11:19 AM, Johannes Schindelin\n> <johannes.schindelin@gmx.de> wrote:\n> > The Git daemon tests create a FIFO first thing and will hang if said\n> > FIFO is not available.\n> >\n> > This is a problem with Git for Windows, where `mkfifo` is an MSYS2\n> > program that leverages MSYS2's POSIX emulation layer, but\n> > `git-daemon.exe` is a MINGW program that has not the first clue about\n> > that POSIX emulation layer and therefore blinks twice when it sees\n> > MSYS2's emulated FIFOs and then just stares into space.\n> >\n> > This lets t5570-git-daemon.sh and t5811-proto-disable-git.sh pass.\n> >\n> > Signed-off-by: Stepan Kasal <kasal@ucw.cz>\n> > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> > ---\n> > diff --git a/t/lib-git-daemon.sh b/t/lib-git-daemon.sh\n> > @@ -23,6 +23,11 @@ then\n> > +if ! test_have_prereq PIPE\n> \n> Maybe:\n> \n>     if test_have_prereq !PIPE\n> \n> ?\n\nDarn. Of course I only looked for '! .*MINGW', but I should have looked\nfor '! test_have_prereq' in the patches.\n\nJunio, could you kindly fix up locally if this is the only remaining issue\nof this patch series?\n\nThanks,\nDscho\n"},{"id":"276966","messageId":"CAPig+cQR11JtTrcHNAWytTRfdWis4qmzODs-Key-8c+8fgKoUQ@mail.gmail.com","threadId":"41254","inReplyTo":"cover.1453911367.git.johannes.schindelin@gmx.de","subject":"Re: [PATCH v3 00/20] Let Git's tests pass on Windows","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2016-01-28T08:42:03Z","receivedAt":"2016-01-28T08:42:03Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Wed, Jan 27, 2016 at 11:19 AM, Johannes Schindelin\n<johannes.schindelin@gmx.de> wrote:\n> Relative to v2, this fixes stupid typos that made the tests fail on\n> Linux, a stupid copy-paste error pointed out by Eric Sunshine,\n> unnecessary 'printf \"\"' calls pointed out by Junio Hamano, and I now\n> use `test_have_prereq !MINGW` consistently, as pointed out by both Eric\n> and Junio. This time, I also send the patch series with the character\n> set set (sic!) to UTF-8. Oh, and this time, I also made sure that the\n> regression tests pass on Windows & Linux alike.\n\nFor what it's worth, I ran the test suite on Mac OS X and FreeBSD, as\nwell, with this series applied and didn't run across any problems. I\nalso read through v3 and, other than the micro nit in patch 11/20,\ndidn't find anything upon which to comment.\n"},{"id":"276969","messageId":"alpine.DEB.2.20.1601280957040.2964@virtualbox","threadId":"41254","inReplyTo":"CAPig+cQR11JtTrcHNAWytTRfdWis4qmzODs-Key-8c+8fgKoUQ@mail.gmail.com","subject":"Re: [PATCH v3 00/20] Let Git's tests pass on Windows","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-01-28T08:57:58Z","receivedAt":"2016-01-28T08:57:58Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Eric,\n\nOn Thu, 28 Jan 2016, Eric Sunshine wrote:\n\n> On Wed, Jan 27, 2016 at 11:19 AM, Johannes Schindelin\n> <johannes.schindelin@gmx.de> wrote:\n> > Relative to v2, this fixes stupid typos that made the tests fail on\n> > Linux, a stupid copy-paste error pointed out by Eric Sunshine,\n> > unnecessary 'printf \"\"' calls pointed out by Junio Hamano, and I now\n> > use `test_have_prereq !MINGW` consistently, as pointed out by both Eric\n> > and Junio. This time, I also send the patch series with the character\n> > set set (sic!) to UTF-8. Oh, and this time, I also made sure that the\n> > regression tests pass on Windows & Linux alike.\n> \n> For what it's worth, I ran the test suite on Mac OS X and FreeBSD, as\n> well, with this series applied and didn't run across any problems. I\n> also read through v3 and, other than the micro nit in patch 11/20,\n> didn't find anything upon which to comment.\n\nThank you so much! I really appreciate your feedback, and I have a lot of\nrespect for reviewers that go through a 19 or 20 strong patch series.\n\nThanks!\nDscho\n"},{"id":"277010","messageId":"xmqqd1slmlp9.fsf@gitster.mtv.corp.google.com","threadId":"41254","inReplyTo":"alpine.DEB.2.20.1601280939170.2964@virtualbox","subject":"Re: [PATCH v3 11/20] tests: turn off git-daemon tests if FIFOs are not available","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-01-28T21:35:30Z","receivedAt":"2016-01-28T21:35:30Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n>> > diff --git a/t/lib-git-daemon.sh b/t/lib-git-daemon.sh\n>> > @@ -23,6 +23,11 @@ then\n>> > +if ! test_have_prereq PIPE\n>> \n>> Maybe:\n>> \n>>     if test_have_prereq !PIPE\n>> \n>> ?\n>\n> Darn. Of course I only looked for '! .*MINGW', but I should have looked\n> for '! test_have_prereq' in the patches.\n\nWow.  Talk about fine-toothed comb ;-)\n\nWill squash in.  Thanks for a set of sharp eyes.\n"},{"id":"277011","messageId":"xmqq8u39mlmi.fsf@gitster.mtv.corp.google.com","threadId":"41254","inReplyTo":"alpine.DEB.2.20.1601280957040.2964@virtualbox","subject":"Re: [PATCH v3 00/20] Let Git's tests pass on Windows","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-01-28T21:37:09Z","receivedAt":"2016-01-28T21:37:09Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n>> For what it's worth, I ran the test suite on Mac OS X and FreeBSD, as\n>> well, with this series applied and didn't run across any problems. I\n>> also read through v3 and, other than the micro nit in patch 11/20,\n>> didn't find anything upon which to comment.\n>\n> Thank you so much! I really appreciate your feedback, and I have a lot of\n> respect for reviewers that go through a 19 or 20 strong patch series.\n\nYeah, especially with multiple rerolls.\n\nThanks, both.  Will requeue.\n"}]}