{"thread":{"id":"37099","subject":"Topic sk/mingw-unicode-spawn-args breaks tests","startedAt":"2014-07-10T20:05:50Z","lastAt":"2014-07-21T22:39:39Z","messageCount":46,"participants":["Johannes Sixt","Karsten Blees","Stepan Kasal","Johannes Schindelin","Junio C Hamano","Jonathan Nieder","Thomas Braun","Erik Faye-Lund"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"245708","messageId":"53BEF21E.9090007@kdbg.org","threadId":"37099","inReplyTo":null,"subject":"Topic sk/mingw-unicode-spawn-args breaks tests","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2014-07-10T20:05:50Z","receivedAt":"2014-07-10T20:05:50Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"It looks like I totally missed the topic sk/mingw-unicode-spawn-args.\nNow it's in master, and it breaks lots of test cases for me:\n\nt0050-filesystem\nt0110-urlmatch-normalization\nt4014-format-patch\nt4041-diff-submodule-option\nt4120-apply-popt\nt4201-shortlog\nt4205-log-pretty-formats\nt4209-log-pickaxe\nt4210-log-i18n\n(I killed the test run here)\n\nAm I doing something wrong? Does the topic depend on a particular\nversion of MSYS (or DLL)?\n\n-- Hannes\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"245822","messageId":"53C03FBB.1080807@gmail.com","threadId":"37099","inReplyTo":"53BEF21E.9090007@kdbg.org","subject":"Re: Topic sk/mingw-unicode-spawn-args breaks tests","fromName":"Karsten Blees","fromEmail":"karsten.blees@gmail.com","sentAt":"2014-07-11T19:49:15Z","receivedAt":"2014-07-11T19:49:15Z","isPatch":false,"sender":{"key":"karsten.blees@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1111200?v=4"},"body":"Am 10.07.2014 22:05, schrieb Johannes Sixt:\n> It looks like I totally missed the topic sk/mingw-unicode-spawn-args.\n> Now it's in master, and it breaks lots of test cases for me:\n> \n> t0050-filesystem\n> t0110-urlmatch-normalization\n> t4014-format-patch\n> t4041-diff-submodule-option\n> t4120-apply-popt\n> t4201-shortlog\n> t4205-log-pretty-formats\n> t4209-log-pickaxe\n> t4210-log-i18n\n> (I killed the test run here)\n> \n> Am I doing something wrong? Does the topic depend on a particular\n> version of MSYS (or DLL)?\n> \n> -- Hannes\n> \n\nAfter commenting out fchmod in config.c, I get similar results.\n\nAt first glance, t0050 seems to fail because the unicode file\nname patches are still missing.\n\nt4041 tries to pass ISO-8859-1 encoded bytes on the command line,\nwhich simply doesn't work on Windows (all OS APIs 'talk' UTF-16).\nWe have a fix for this in the msysgit fork [1] (but unfortunately\nin another branch, so Stepan couldn't know the patch is related).\n\nI suspect the other failures also fall in these two categories.\n\n[1] https://github.com/msysgit/git/commit/ef4a733c\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"245887","messageId":"20140712075035.GA12400@ucw.cz","threadId":"37099","inReplyTo":"53C03FBB.1080807@gmail.com","subject":"Re: Topic sk/mingw-unicode-spawn-args breaks tests","fromName":"Stepan Kasal","fromEmail":"kasal@ucw.cz","sentAt":"2014-07-12T07:50:35Z","receivedAt":"2014-07-12T07:50:35Z","isPatch":false,"sender":{"key":"kasal@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/1481596?v=4"},"body":"Hello Hannes,\n\n> Am 10.07.2014 22:05, schrieb Johannes Sixt:\n> > It looks like I totally missed the topic sk/mingw-unicode-spawn-args.\n...\n> > Am I doing something wrong? Does the topic depend on a particular\n> > version of MSYS (or DLL)?\n\nunfortunately, I paused my submissions at random point.\n\nI'm sorry for breaking your setup.  I was not aware there is any\nworking Windows setup beyond msysGit.  Thus I did not object when the\nhalf-done work was going to be moved ot master.\n\nI'll try to submit the patches needed so that your setup works again.\n\nKarsten writes:\n> At first glance, t0050 seems to fail because the unicode file\n> name patches are still missing.\n\nIndeed, this is a pair of patches on the tip of my queue.\n\n> t4041 tries to pass ISO-8859-1 encoded bytes on the command line,\n> which simply doesn't work on Windows (all OS APIs 'talk' UTF-16).\n> We have a fix for this in the msysgit fork [1] (but unfortunately\n> in another branch, so Stepan couldn't know the patch is related).\n\nThere is a whole branch named win-tests or some such.  I remember I\nwas hunting for not-yet resolved instances of this bug.  This\nconvinced me that the test suite of vanilla git cannot work on\nWindows.  I was not aware about the fact that this problem was masked\nin the versions before Karsten's unicode patches.\n\nHannes, I'd like to submit the patches mentioned here during the\nfollowing week and I'd be glad to hear from you.\n\nStepan\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"246040","messageId":"alpine.DEB.1.00.1407150217300.18949@s15462909.onlinehome-server.info","threadId":"37099","inReplyTo":"20140712075035.GA12400@ucw.cz","subject":"Re: Re: Topic sk/mingw-unicode-spawn-args breaks tests","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2014-07-15T00:21:45Z","receivedAt":"2014-07-15T00:21:45Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Stepan,\n\nOn Sat, 12 Jul 2014, Stepan Kasal wrote:\n\n> > Am 10.07.2014 22:05, schrieb Johannes Sixt:\n> > > It looks like I totally missed the topic sk/mingw-unicode-spawn-args.\n> ...\n> > > Am I doing something wrong? Does the topic depend on a particular\n> > > version of MSYS (or DLL)?\n> \n> unfortunately, I paused my submissions at random point.\n\n;-)\n\n> I'm sorry for breaking your setup.  I was not aware there is any\n> working Windows setup beyond msysGit.\n\nThere is one other, very notable development environment relevant to Git\nfor Windows: https://github.com/sschuberth/mingwGitDevEnv. It is slated to\nbe the development environment to produce Git for Windows starting with\nversion 2.0.0.\n\nI have pretty concrete plans to work on that switch, which will most\nlikely also affect Hannes (who has so far successfully resisted to develop\nGit using the msysGit environment).\n\nThose plans to step up my efforts regarding Git for Windows imply my\nspending more time on the project again, subject to a couple of things\nthat are still being hashed out.\n\nStay tuned,\nDscho\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"246050","messageId":"1405431797-20899-1-git-send-email-kasal@ucw.cz","threadId":"37099","inReplyTo":"20140712075035.GA12400@ucw.cz","subject":"[PATCH 0/3] fix test suite with mingw-unicode patches","fromName":"Stepan Kasal","fromEmail":"kasal@ucw.cz","sentAt":"2014-07-15T13:43:14Z","receivedAt":"2014-07-15T13:43:14Z","isPatch":true,"sender":{"key":"kasal@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/1481596?v=4"},"body":"Hello Hannes,\nattached please find the patches that Karsten pointed out:\n\n1) The unicode file name support was omitted from his unicode patch\nseries; my mistake, sorry.  There is still big part missing: support\nfor unicode environment; I can only hope the tests would choke on\nthat.\n\n2) Windows cannot pass non-UTF parameters (commit messages in this\ncase): original patch by Pat Thoyts was extended to apply to other\nsimilar cases: the commit msg is passed through stdin.\n\nIf there are still problems remaining, please tell us.\n\nThanks,\n\tStepan\n\nKarsten Blees (2):\n  Win32: Unicode file name support (except dirent)\n  Win32: Unicode file name support (dirent)\n\nPat Thoyts and Stepan Kasal(1):\n  tests: do not pass iso8859-1 encoded parameter\n\n compat/mingw.c                   | 198 +++++++++++++++++++++++++++++----------\n compat/mingw.h                   |  18 +++-\n compat/win32/dirent.c            |  30 ++----\n compat/win32/dirent.h            |   2 +-\n t/t4041-diff-submodule-option.sh |   6 +-\n t/t4205-log-pretty-formats.sh    |   2 +-\n t/t6006-rev-list-format.sh       |   4 +-\n t/t7102-reset.sh                 |   8 +-\n 8 files changed, 184 insertions(+), 84 deletions(-)\n\n-- \n2.0.0.9635.g0be03cb\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"246053","messageId":"1405431797-20899-2-git-send-email-kasal@ucw.cz","threadId":"37099","inReplyTo":"1405431797-20899-1-git-send-email-kasal@ucw.cz","subject":"[PATCH 1/3] Win32: Unicode file name support (except dirent)","fromName":"Stepan Kasal","fromEmail":"kasal@ucw.cz","sentAt":"2014-07-15T13:43:15Z","receivedAt":"2014-07-15T13:43:15Z","isPatch":true,"sender":{"key":"kasal@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/1481596?v=4"},"body":"From: Karsten Blees <blees@dcon.de>\nDate: Thu, 15 Mar 2012 18:21:28 +0100\n\nReplaces Windows \"ANSI\" APIs dealing with file- or path names with their\nUnicode equivalent, adding UTF-8/UTF-16LE conversion as necessary.\n\nThe dirent API (opendir/readdir/closedir) is updated in a separate commit.\n\nAdds trivial wrappers for access, chmod and chdir.\n\nAdds wrapper for mktemp (needed for both mkstemp and mkdtemp).\n\nThe simplest way to convert a repository with legacy-encoded (e.g. Cp1252)\nfile names to UTF-8 ist to checkout with an old msysgit version and\n\"git add --all & git commit\" with the new version.\n\nIncludes a fix for bug reported by John Chen:\nOn Windows XP (not Win7), directories cannot be deleted while a find handle\nis open, causing \"Deletion of directory '...' failed. Should I try again?\"\nprompts.\n\nPrior to this commit, these failures were silently ignored due to\nstrbuf_free in is_dir_empty resetting GetLastError to ERROR_SUCCESS.\n\nClose the find handle in is_dir_empty so that git doesn't block deletion\nof the directory even after all other applications have released it.\n\nReported-by: John Chen <john0312@gmail.com>\nSigned-off-by: Karsten Blees <blees@dcon.de>\nSigned-off-by: Stepan Kasal <kasal@ucw.cz>\n---\n compat/mingw.c | 198 ++++++++++++++++++++++++++++++++++++++++++---------------\n compat/mingw.h |  18 ++++--\n 2 files changed, 160 insertions(+), 56 deletions(-)\n\ndiff --git a/compat/mingw.c b/compat/mingw.c\nindex 3baaa4d..c19e3d9 100644\n--- a/compat/mingw.c\n+++ b/compat/mingw.c\n@@ -1,6 +1,7 @@\n #include \"../git-compat-util.h\"\n #include \"win32.h\"\n #include <conio.h>\n+#include <wchar.h>\n #include \"../strbuf.h\"\n #include \"../run-command.h\"\n \n@@ -198,14 +199,16 @@ static int ask_yes_no_if_possible(const char *format, ...)\n \t}\n }\n \n-#undef unlink\n int mingw_unlink(const char *pathname)\n {\n \tint ret, tries = 0;\n+\twchar_t wpathname[MAX_PATH];\n+\tif (xutftowcs_path(wpathname, pathname) < 0)\n+\t\treturn -1;\n \n \t/* read-only files cannot be removed */\n-\tchmod(pathname, 0666);\n-\twhile ((ret = unlink(pathname)) == -1 && tries < ARRAY_SIZE(delay)) {\n+\t_wchmod(wpathname, 0666);\n+\twhile ((ret = _wunlink(wpathname)) == -1 && tries < ARRAY_SIZE(delay)) {\n \t\tif (!is_file_in_use_error(GetLastError()))\n \t\t\tbreak;\n \t\t/*\n@@ -221,45 +224,45 @@ int mingw_unlink(const char *pathname)\n \twhile (ret == -1 && is_file_in_use_error(GetLastError()) &&\n \t       ask_yes_no_if_possible(\"Unlink of file '%s' failed. \"\n \t\t\t\"Should I try again?\", pathname))\n-\t       ret = unlink(pathname);\n+\t       ret = _wunlink(wpathname);\n \treturn ret;\n }\n \n-static int is_dir_empty(const char *path)\n+static int is_dir_empty(const wchar_t *wpath)\n {\n-\tstruct strbuf buf = STRBUF_INIT;\n-\tWIN32_FIND_DATAA findbuf;\n+\tWIN32_FIND_DATAW findbuf;\n \tHANDLE handle;\n-\n-\tstrbuf_addf(&buf, \"%s\\\\*\", path);\n-\thandle = FindFirstFileA(buf.buf, &findbuf);\n-\tif (handle == INVALID_HANDLE_VALUE) {\n-\t\tstrbuf_release(&buf);\n+\twchar_t wbuf[MAX_PATH + 2];\n+\twcscpy(wbuf, wpath);\n+\twcscat(wbuf, L\"\\\\*\");\n+\thandle = FindFirstFileW(wbuf, &findbuf);\n+\tif (handle == INVALID_HANDLE_VALUE)\n \t\treturn GetLastError() == ERROR_NO_MORE_FILES;\n-\t}\n \n-\twhile (!strcmp(findbuf.cFileName, \".\") ||\n-\t\t\t!strcmp(findbuf.cFileName, \"..\"))\n-\t\tif (!FindNextFile(handle, &findbuf)) {\n-\t\t\tstrbuf_release(&buf);\n-\t\t\treturn GetLastError() == ERROR_NO_MORE_FILES;\n+\twhile (!wcscmp(findbuf.cFileName, L\".\") ||\n+\t\t\t!wcscmp(findbuf.cFileName, L\"..\"))\n+\t\tif (!FindNextFileW(handle, &findbuf)) {\n+\t\t\tDWORD err = GetLastError();\n+\t\t\tFindClose(handle);\n+\t\t\treturn err == ERROR_NO_MORE_FILES;\n \t\t}\n \tFindClose(handle);\n-\tstrbuf_release(&buf);\n \treturn 0;\n }\n \n-#undef rmdir\n int mingw_rmdir(const char *pathname)\n {\n \tint ret, tries = 0;\n+\twchar_t wpathname[MAX_PATH];\n+\tif (xutftowcs_path(wpathname, pathname) < 0)\n+\t\treturn -1;\n \n-\twhile ((ret = rmdir(pathname)) == -1 && tries < ARRAY_SIZE(delay)) {\n+\twhile ((ret = _wrmdir(wpathname)) == -1 && tries < ARRAY_SIZE(delay)) {\n \t\tif (!is_file_in_use_error(GetLastError()))\n \t\t\terrno = err_win_to_posix(GetLastError());\n \t\tif (errno != EACCES)\n \t\t\tbreak;\n-\t\tif (!is_dir_empty(pathname)) {\n+\t\tif (!is_dir_empty(wpathname)) {\n \t\t\terrno = ENOTEMPTY;\n \t\t\tbreak;\n \t\t}\n@@ -276,16 +279,26 @@ int mingw_rmdir(const char *pathname)\n \twhile (ret == -1 && errno == EACCES && is_file_in_use_error(GetLastError()) &&\n \t       ask_yes_no_if_possible(\"Deletion of directory '%s' failed. \"\n \t\t\t\"Should I try again?\", pathname))\n-\t       ret = rmdir(pathname);\n+\t       ret = _wrmdir(wpathname);\n+\treturn ret;\n+}\n+\n+int mingw_mkdir(const char *path, int mode)\n+{\n+\tint ret;\n+\twchar_t wpath[MAX_PATH];\n+\tif (xutftowcs_path(wpath, path) < 0)\n+\t\treturn -1;\n+\tret = _wmkdir(wpath);\n \treturn ret;\n }\n \n-#undef open\n int mingw_open (const char *filename, int oflags, ...)\n {\n \tva_list args;\n \tunsigned mode;\n \tint fd;\n+\twchar_t wfilename[MAX_PATH];\n \n \tva_start(args, oflags);\n \tmode = va_arg(args, int);\n@@ -294,10 +307,12 @@ int mingw_open (const char *filename, int oflags, ...)\n \tif (filename && !strcmp(filename, \"/dev/null\"))\n \t\tfilename = \"nul\";\n \n-\tfd = open(filename, oflags, mode);\n+\tif (xutftowcs_path(wfilename, filename) < 0)\n+\t\treturn -1;\n+\tfd = _wopen(wfilename, oflags, mode);\n \n \tif (fd < 0 && (oflags & O_CREAT) && errno == EACCES) {\n-\t\tDWORD attrs = GetFileAttributes(filename);\n+\t\tDWORD attrs = GetFileAttributesW(wfilename);\n \t\tif (attrs != INVALID_FILE_ATTRIBUTES && (attrs & FILE_ATTRIBUTE_DIRECTORY))\n \t\t\terrno = EISDIR;\n \t}\n@@ -332,17 +347,28 @@ int mingw_fgetc(FILE *stream)\n #undef fopen\n FILE *mingw_fopen (const char *filename, const char *otype)\n {\n+\tFILE *file;\n+\twchar_t wfilename[MAX_PATH], wotype[4];\n \tif (filename && !strcmp(filename, \"/dev/null\"))\n \t\tfilename = \"nul\";\n-\treturn fopen(filename, otype);\n+\tif (xutftowcs_path(wfilename, filename) < 0 ||\n+\t\txutftowcs(wotype, otype, ARRAY_SIZE(wotype)) < 0)\n+\t\treturn NULL;\n+\tfile = _wfopen(wfilename, wotype);\n+\treturn file;\n }\n \n-#undef freopen\n FILE *mingw_freopen (const char *filename, const char *otype, FILE *stream)\n {\n+\tFILE *file;\n+\twchar_t wfilename[MAX_PATH], wotype[4];\n \tif (filename && !strcmp(filename, \"/dev/null\"))\n \t\tfilename = \"nul\";\n-\treturn freopen(filename, otype, stream);\n+\tif (xutftowcs_path(wfilename, filename) < 0 ||\n+\t\txutftowcs(wotype, otype, ARRAY_SIZE(wotype)) < 0)\n+\t\treturn NULL;\n+\tfile = _wfreopen(wfilename, wotype, stream);\n+\treturn file;\n }\n \n #undef fflush\n@@ -367,6 +393,31 @@ int mingw_fflush(FILE *stream)\n \treturn ret;\n }\n \n+int mingw_access(const char *filename, int mode)\n+{\n+\twchar_t wfilename[MAX_PATH];\n+\tif (xutftowcs_path(wfilename, filename) < 0)\n+\t\treturn -1;\n+\t/* X_OK is not supported by the MSVCRT version */\n+\treturn _waccess(wfilename, mode & ~X_OK);\n+}\n+\n+int mingw_chdir(const char *dirname)\n+{\n+\twchar_t wdirname[MAX_PATH];\n+\tif (xutftowcs_path(wdirname, dirname) < 0)\n+\t\treturn -1;\n+\treturn _wchdir(wdirname);\n+}\n+\n+int mingw_chmod(const char *filename, int mode)\n+{\n+\twchar_t wfilename[MAX_PATH];\n+\tif (xutftowcs_path(wfilename, filename) < 0)\n+\t\treturn -1;\n+\treturn _wchmod(wfilename, mode);\n+}\n+\n /*\n  * The unit of FILETIME is 100-nanoseconds since January 1, 1601, UTC.\n  * Returns the 100-nanoseconds (\"hekto nanoseconds\") since the epoch.\n@@ -392,10 +443,12 @@ static inline time_t filetime_to_time_t(const FILETIME *ft)\n  */\n static int do_lstat(int follow, const char *file_name, struct stat *buf)\n {\n-\tint err;\n \tWIN32_FILE_ATTRIBUTE_DATA fdata;\n+\twchar_t wfilename[MAX_PATH];\n+\tif (xutftowcs_path(wfilename, file_name) < 0)\n+\t\treturn -1;\n \n-\tif (!(err = get_file_attr(file_name, &fdata))) {\n+\tif (GetFileAttributesExW(wfilename, GetFileExInfoStandard, &fdata)) {\n \t\tbuf->st_ino = 0;\n \t\tbuf->st_gid = 0;\n \t\tbuf->st_uid = 0;\n@@ -408,8 +461,8 @@ static int do_lstat(int follow, const char *file_name, struct stat *buf)\n \t\tbuf->st_mtime = filetime_to_time_t(&(fdata.ftLastWriteTime));\n \t\tbuf->st_ctime = filetime_to_time_t(&(fdata.ftCreationTime));\n \t\tif (fdata.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) {\n-\t\t\tWIN32_FIND_DATAA findbuf;\n-\t\t\tHANDLE handle = FindFirstFileA(file_name, &findbuf);\n+\t\t\tWIN32_FIND_DATAW findbuf;\n+\t\t\tHANDLE handle = FindFirstFileW(wfilename, &findbuf);\n \t\t\tif (handle != INVALID_HANDLE_VALUE) {\n \t\t\t\tif ((findbuf.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) &&\n \t\t\t\t\t\t(findbuf.dwReserved0 == IO_REPARSE_TAG_SYMLINK)) {\n@@ -428,7 +481,23 @@ static int do_lstat(int follow, const char *file_name, struct stat *buf)\n \t\t}\n \t\treturn 0;\n \t}\n-\terrno = err;\n+\tswitch (GetLastError()) {\n+\tcase ERROR_ACCESS_DENIED:\n+\tcase ERROR_SHARING_VIOLATION:\n+\tcase ERROR_LOCK_VIOLATION:\n+\tcase ERROR_SHARING_BUFFER_EXCEEDED:\n+\t\terrno = EACCES;\n+\t\tbreak;\n+\tcase ERROR_BUFFER_OVERFLOW:\n+\t\terrno = ENAMETOOLONG;\n+\t\tbreak;\n+\tcase ERROR_NOT_ENOUGH_MEMORY:\n+\t\terrno = ENOMEM;\n+\t\tbreak;\n+\tdefault:\n+\t\terrno = ENOENT;\n+\t\tbreak;\n+\t}\n \treturn -1;\n }\n \n@@ -516,16 +585,20 @@ int mingw_utime (const char *file_name, const struct utimbuf *times)\n {\n \tFILETIME mft, aft;\n \tint fh, rc;\n+\tDWORD attrs;\n+\twchar_t wfilename[MAX_PATH];\n+\tif (xutftowcs_path(wfilename, file_name) < 0)\n+\t\treturn -1;\n \n \t/* must have write permission */\n-\tDWORD attrs = GetFileAttributes(file_name);\n+\tattrs = GetFileAttributesW(wfilename);\n \tif (attrs != INVALID_FILE_ATTRIBUTES &&\n \t    (attrs & FILE_ATTRIBUTE_READONLY)) {\n \t\t/* ignore errors here; open() will report them */\n-\t\tSetFileAttributes(file_name, attrs & ~FILE_ATTRIBUTE_READONLY);\n+\t\tSetFileAttributesW(wfilename, attrs & ~FILE_ATTRIBUTE_READONLY);\n \t}\n \n-\tif ((fh = open(file_name, O_RDWR | O_BINARY)) < 0) {\n+\tif ((fh = _wopen(wfilename, O_RDWR | O_BINARY)) < 0) {\n \t\trc = -1;\n \t\tgoto revert_attrs;\n \t}\n@@ -548,7 +621,7 @@ revert_attrs:\n \tif (attrs != INVALID_FILE_ATTRIBUTES &&\n \t    (attrs & FILE_ATTRIBUTE_READONLY)) {\n \t\t/* ignore errors again */\n-\t\tSetFileAttributes(file_name, attrs);\n+\t\tSetFileAttributesW(wfilename, attrs);\n \t}\n \treturn rc;\n }\n@@ -559,6 +632,18 @@ unsigned int sleep (unsigned int seconds)\n \treturn 0;\n }\n \n+char *mingw_mktemp(char *template)\n+{\n+\twchar_t wtemplate[MAX_PATH];\n+\tif (xutftowcs_path(wtemplate, template) < 0)\n+\t\treturn NULL;\n+\tif (!_wmktemp(wtemplate))\n+\t\treturn NULL;\n+\tif (xwcstoutf(template, wtemplate, strlen(template) + 1) < 0)\n+\t\treturn NULL;\n+\treturn template;\n+}\n+\n int mkstemp(char *template)\n {\n \tchar *filename = mktemp(template);\n@@ -617,17 +702,18 @@ struct tm *localtime_r(const time_t *timep, struct tm *result)\n \treturn result;\n }\n \n-#undef getcwd\n char *mingw_getcwd(char *pointer, int len)\n {\n \tint i;\n-\tchar *ret = getcwd(pointer, len);\n-\tif (!ret)\n-\t\treturn ret;\n+\twchar_t wpointer[MAX_PATH];\n+\tif (!_wgetcwd(wpointer, ARRAY_SIZE(wpointer)))\n+\t\treturn NULL;\n+\tif (xwcstoutf(pointer, wpointer, len) < 0)\n+\t\treturn NULL;\n \tfor (i = 0; pointer[i]; i++)\n \t\tif (pointer[i] == '\\\\')\n \t\t\tpointer[i] = '/';\n-\treturn ret;\n+\treturn pointer;\n }\n \n /*\n@@ -1485,33 +1571,36 @@ int mingw_rename(const char *pold, const char *pnew)\n {\n \tDWORD attrs, gle;\n \tint tries = 0;\n+\twchar_t wpold[MAX_PATH], wpnew[MAX_PATH];\n+\tif (xutftowcs_path(wpold, pold) < 0 || xutftowcs_path(wpnew, pnew) < 0)\n+\t\treturn -1;\n \n \t/*\n \t * Try native rename() first to get errno right.\n \t * It is based on MoveFile(), which cannot overwrite existing files.\n \t */\n-\tif (!rename(pold, pnew))\n+\tif (!_wrename(wpold, wpnew))\n \t\treturn 0;\n \tif (errno != EEXIST)\n \t\treturn -1;\n repeat:\n-\tif (MoveFileEx(pold, pnew, MOVEFILE_REPLACE_EXISTING))\n+\tif (MoveFileExW(wpold, wpnew, MOVEFILE_REPLACE_EXISTING))\n \t\treturn 0;\n \t/* TODO: translate more errors */\n \tgle = GetLastError();\n \tif (gle == ERROR_ACCESS_DENIED &&\n-\t    (attrs = GetFileAttributes(pnew)) != INVALID_FILE_ATTRIBUTES) {\n+\t    (attrs = GetFileAttributesW(wpnew)) != INVALID_FILE_ATTRIBUTES) {\n \t\tif (attrs & FILE_ATTRIBUTE_DIRECTORY) {\n \t\t\terrno = EISDIR;\n \t\t\treturn -1;\n \t\t}\n \t\tif ((attrs & FILE_ATTRIBUTE_READONLY) &&\n-\t\t    SetFileAttributes(pnew, attrs & ~FILE_ATTRIBUTE_READONLY)) {\n-\t\t\tif (MoveFileEx(pold, pnew, MOVEFILE_REPLACE_EXISTING))\n+\t\t    SetFileAttributesW(wpnew, attrs & ~FILE_ATTRIBUTE_READONLY)) {\n+\t\t\tif (MoveFileExW(wpold, wpnew, MOVEFILE_REPLACE_EXISTING))\n \t\t\t\treturn 0;\n \t\t\tgle = GetLastError();\n \t\t\t/* revert file attributes on failure */\n-\t\t\tSetFileAttributes(pnew, attrs);\n+\t\t\tSetFileAttributesW(wpnew, attrs);\n \t\t}\n \t}\n \tif (tries < ARRAY_SIZE(delay) && gle == ERROR_ACCESS_DENIED) {\n@@ -1757,11 +1846,16 @@ void mingw_open_html(const char *unixpath)\n \n int link(const char *oldpath, const char *newpath)\n {\n-\ttypedef BOOL (WINAPI *T)(const char*, const char*, LPSECURITY_ATTRIBUTES);\n+\ttypedef BOOL (WINAPI *T)(LPCWSTR, LPCWSTR, LPSECURITY_ATTRIBUTES);\n \tstatic T create_hard_link = NULL;\n+\twchar_t woldpath[MAX_PATH], wnewpath[MAX_PATH];\n+\tif (xutftowcs_path(woldpath, oldpath) < 0 ||\n+\t\txutftowcs_path(wnewpath, newpath) < 0)\n+\t\treturn -1;\n+\n \tif (!create_hard_link) {\n \t\tcreate_hard_link = (T) GetProcAddress(\n-\t\t\tGetModuleHandle(\"kernel32.dll\"), \"CreateHardLinkA\");\n+\t\t\tGetModuleHandle(\"kernel32.dll\"), \"CreateHardLinkW\");\n \t\tif (!create_hard_link)\n \t\t\tcreate_hard_link = (T)-1;\n \t}\n@@ -1769,7 +1863,7 @@ int link(const char *oldpath, const char *newpath)\n \t\terrno = ENOSYS;\n \t\treturn -1;\n \t}\n-\tif (!create_hard_link(newpath, oldpath, NULL)) {\n+\tif (!create_hard_link(wnewpath, woldpath, NULL)) {\n \t\terrno = err_win_to_posix(GetLastError());\n \t\treturn -1;\n \t}\ndiff --git a/compat/mingw.h b/compat/mingw.h\nindex 8dac6f9..405c08f 100644\n--- a/compat/mingw.h\n+++ b/compat/mingw.h\n@@ -118,10 +118,7 @@ static inline int fcntl(int fd, int cmd, ...)\n  * simple adaptors\n  */\n \n-static inline int mingw_mkdir(const char *path, int mode)\n-{\n-\treturn mkdir(path);\n-}\n+int mingw_mkdir(const char *path, int mode);\n #define mkdir mingw_mkdir\n \n #define WNOHANG 1\n@@ -192,6 +189,19 @@ FILE *mingw_freopen (const char *filename, const char *otype, FILE *stream);\n int mingw_fflush(FILE *stream);\n #define fflush mingw_fflush\n \n+int mingw_access(const char *filename, int mode);\n+#undef access\n+#define access mingw_access\n+\n+int mingw_chdir(const char *dirname);\n+#define chdir mingw_chdir\n+\n+int mingw_chmod(const char *filename, int mode);\n+#define chmod mingw_chmod\n+\n+char *mingw_mktemp(char *template);\n+#define mktemp mingw_mktemp\n+\n char *mingw_getcwd(char *pointer, int len);\n #define getcwd mingw_getcwd\n \n-- \n2.0.0.9635.g0be03cb\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"246052","messageId":"1405431797-20899-3-git-send-email-kasal@ucw.cz","threadId":"37099","inReplyTo":"1405431797-20899-1-git-send-email-kasal@ucw.cz","subject":"[PATCH 2/3] Win32: Unicode file name support (dirent)","fromName":"Stepan Kasal","fromEmail":"kasal@ucw.cz","sentAt":"2014-07-15T13:43:16Z","receivedAt":"2014-07-15T13:43:16Z","isPatch":true,"sender":{"key":"kasal@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/1481596?v=4"},"body":"From: Karsten Blees <blees@dcon.de>\nDate: Sat, 14 Jan 2012 22:01:09 +0100\n\nChanges opendir/readdir to use Windows Unicode APIs and convert between\nUTF-8/UTF-16.\n\nRemoves parameter checks that are already covered by xutftowcs_path. This\nchanges detection of ENAMETOOLONG from MAX_PATH - 2 to MAX_PATH (matching\nis_dir_empty in mingw.c). If name + \"/*\" or the resulting absolute path is\ntoo long, FindFirstFile fails and errno is set through err_win_to_posix.\n\nIncreases the size of dirent.d_name to accommodate the full\nWIN32_FIND_DATA.cFileName converted to UTF-8 (UTF-16 to UTF-8 conversion\nmay grow by factor three in the worst case).\n\nSigned-off-by: Karsten Blees <blees@dcon.de>\nSigned-off-by: Stepan Kasal <kasal@ucw.cz>\n---\n compat/win32/dirent.c | 30 ++++++++++--------------------\n compat/win32/dirent.h |  2 +-\n 2 files changed, 11 insertions(+), 21 deletions(-)\n\ndiff --git a/compat/win32/dirent.c b/compat/win32/dirent.c\nindex 82a515c..52420ec 100644\n--- a/compat/win32/dirent.c\n+++ b/compat/win32/dirent.c\n@@ -6,10 +6,10 @@ struct DIR {\n \tint dd_stat;          /* 0-based index */\n };\n \n-static inline void finddata2dirent(struct dirent *ent, WIN32_FIND_DATAA *fdata)\n+static inline void finddata2dirent(struct dirent *ent, WIN32_FIND_DATAW *fdata)\n {\n-\t/* copy file name from WIN32_FIND_DATA to dirent */\n-\tmemcpy(ent->d_name, fdata->cFileName, sizeof(ent->d_name));\n+\t/* convert UTF-16 name to UTF-8 */\n+\txwcstoutf(ent->d_name, fdata->cFileName, sizeof(ent->d_name));\n \n \t/* Set file type, based on WIN32_FIND_DATA */\n \tif (fdata->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)\n@@ -20,25 +20,15 @@ static inline void finddata2dirent(struct dirent *ent, WIN32_FIND_DATAA *fdata)\n \n DIR *opendir(const char *name)\n {\n-\tchar pattern[MAX_PATH];\n-\tWIN32_FIND_DATAA fdata;\n+\twchar_t pattern[MAX_PATH + 2]; /* + 2 for '/' '*' */\n+\tWIN32_FIND_DATAW fdata;\n \tHANDLE h;\n \tint len;\n \tDIR *dir;\n \n-\t/* check that name is not NULL */\n-\tif (!name) {\n-\t\terrno = EINVAL;\n+\t/* convert name to UTF-16 and check length < MAX_PATH */\n+\tif ((len = xutftowcs_path(pattern, name)) < 0)\n \t\treturn NULL;\n-\t}\n-\t/* check that the pattern won't be too long for FindFirstFileA */\n-\tlen = strlen(name);\n-\tif (len + 2 >= MAX_PATH) {\n-\t\terrno = ENAMETOOLONG;\n-\t\treturn NULL;\n-\t}\n-\t/* copy name to temp buffer */\n-\tmemcpy(pattern, name, len + 1);\n \n \t/* append optional '/' and wildcard '*' */\n \tif (len && !is_dir_sep(pattern[len - 1]))\n@@ -47,7 +37,7 @@ DIR *opendir(const char *name)\n \tpattern[len] = 0;\n \n \t/* open find handle */\n-\th = FindFirstFileA(pattern, &fdata);\n+\th = FindFirstFileW(pattern, &fdata);\n \tif (h == INVALID_HANDLE_VALUE) {\n \t\tDWORD err = GetLastError();\n \t\terrno = (err == ERROR_DIRECTORY) ? ENOTDIR : err_win_to_posix(err);\n@@ -72,8 +62,8 @@ struct dirent *readdir(DIR *dir)\n \t/* if first entry, dirent has already been set up by opendir */\n \tif (dir->dd_stat) {\n \t\t/* get next entry and convert from WIN32_FIND_DATA to dirent */\n-\t\tWIN32_FIND_DATAA fdata;\n-\t\tif (FindNextFileA(dir->dd_handle, &fdata)) {\n+\t\tWIN32_FIND_DATAW fdata;\n+\t\tif (FindNextFileW(dir->dd_handle, &fdata)) {\n \t\t\tfinddata2dirent(&dir->dd_dir, &fdata);\n \t\t} else {\n \t\t\tDWORD lasterr = GetLastError();\ndiff --git a/compat/win32/dirent.h b/compat/win32/dirent.h\nindex 8838cd6..058207e 100644\n--- a/compat/win32/dirent.h\n+++ b/compat/win32/dirent.h\n@@ -10,7 +10,7 @@ typedef struct DIR DIR;\n \n struct dirent {\n \tunsigned char d_type;      /* file type to prevent lstat after readdir */\n-\tchar d_name[MAX_PATH];     /* file name */\n+\tchar d_name[MAX_PATH * 3]; /* file name (* 3 for UTF-8 conversion) */\n };\n \n DIR *opendir(const char *dirname);\n-- \n2.0.0.9635.g0be03cb\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"246051","messageId":"1405431797-20899-4-git-send-email-kasal@ucw.cz","threadId":"37099","inReplyTo":"1405431797-20899-1-git-send-email-kasal@ucw.cz","subject":"[PATCH 3/3] tests: do not pass iso8859-1 encoded parameter","fromName":"Stepan Kasal","fromEmail":"kasal@ucw.cz","sentAt":"2014-07-15T13:43:17Z","receivedAt":"2014-07-15T13:43:17Z","isPatch":true,"sender":{"key":"kasal@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/1481596?v=4"},"body":"From: Pat Thoyts <patthoyts@users.sourceforge.net>\nDate: Mon, 2 Sep 2013 15:44:54 +0100\n\ngit commit -m with some iso8859-1 encoded stuff is doomed to fail in MinGW,\nbecause Windows don't let you pass encoded bytes to a process (CreateProcessW\nalways takes a UTF-16LE encoded string).\n\nIt is safe to pass the iso8859-1 message using a file or a pipe.\n\nThanks-to: Karsten Blees <blees@dcon.de>\nAuthor: Stepan Kasal <kasal@ucw.cz>\nSigned-off-by: Stepan Kasal <kasal@ucw.cz>\n---\n t/t4041-diff-submodule-option.sh | 6 ++++--\n t/t4205-log-pretty-formats.sh    | 2 +-\n t/t6006-rev-list-format.sh       | 4 ++--\n t/t7102-reset.sh                 | 8 ++++++--\n 4 files changed, 13 insertions(+), 7 deletions(-)\n\ndiff --git a/t/t4041-diff-submodule-option.sh b/t/t4041-diff-submodule-option.sh\nindex 463d63b..e432896 100755\n--- a/t/t4041-diff-submodule-option.sh\n+++ b/t/t4041-diff-submodule-option.sh\n@@ -26,8 +26,10 @@ add_file () {\n \t\t\techo \"$name\" >\"$name\" &&\n \t\t\tgit add \"$name\" &&\n \t\t\ttest_tick &&\n-\t\t\tmsg_added_iso88591=$(echo \"Add $name ($added $name)\" | iconv -f utf-8 -t $test_encoding) &&\n-\t\t\tgit -c \"i18n.commitEncoding=$test_encoding\" commit -m \"$msg_added_iso88591\"\n+\t\t\t# \"git commit -m\" would break MinGW, as Windows refuse to pass\n+\t\t\t# $test_encoding encoded parameter to git.\n+\t\t\techo \"Add $name ($added $name)\" | iconv -f utf-8 -t $test_encoding |\n+\t\t\tgit -c \"i18n.commitEncoding=$test_encoding\" commit -F -\n \t\tdone >/dev/null &&\n \t\tgit rev-parse --short --verify HEAD\n \t)\ndiff --git a/t/t4205-log-pretty-formats.sh b/t/t4205-log-pretty-formats.sh\nindex c84ec9a..349c531 100755\n--- a/t/t4205-log-pretty-formats.sh\n+++ b/t/t4205-log-pretty-formats.sh\n@@ -31,7 +31,7 @@ test_expect_success 'set up basic repos' '\n \tgit add foo &&\n \ttest_tick &&\n \tgit config i18n.commitEncoding $test_encoding &&\n-\tgit commit -m \"$(commit_msg $test_encoding)\" &&\n+\tcommit_msg $test_encoding | git commit -F - &&\n \tgit add bar &&\n \ttest_tick &&\n \tgit commit -m \"add bar\" &&\ndiff --git a/t/t6006-rev-list-format.sh b/t/t6006-rev-list-format.sh\nindex 88ed319..a02a45a 100755\n--- a/t/t6006-rev-list-format.sh\n+++ b/t/t6006-rev-list-format.sh\n@@ -35,13 +35,13 @@ test_expect_success 'setup' '\n \t: >foo &&\n \tgit add foo &&\n \tgit config i18n.commitEncoding $test_encoding &&\n-\tgit commit -m \"$added_iso88591\" &&\n+\techo \"$added_iso88591\" | git commit -F - &&\n \thead1=$(git rev-parse --verify HEAD) &&\n \thead1_short=$(git rev-parse --verify --short $head1) &&\n \ttree1=$(git rev-parse --verify HEAD:) &&\n \ttree1_short=$(git rev-parse --verify --short $tree1) &&\n \techo \"$changed\" > foo &&\n-\tgit commit -a -m \"$changed_iso88591\" &&\n+\techo \"$changed_iso88591\" | git commit -a -F - &&\n \thead2=$(git rev-parse --verify HEAD) &&\n \thead2_short=$(git rev-parse --verify --short $head2) &&\n \ttree2=$(git rev-parse --verify HEAD:) &&\ndiff --git a/t/t7102-reset.sh b/t/t7102-reset.sh\nindex ee703be..98bcfe2 100755\n--- a/t/t7102-reset.sh\n+++ b/t/t7102-reset.sh\n@@ -44,7 +44,9 @@ test_expect_success 'creating initial files and commits' '\n \n \techo \"1st line 2nd file\" >secondfile &&\n \techo \"2nd line 2nd file\" >>secondfile &&\n-\tgit -c \"i18n.commitEncoding=$test_encoding\" commit -a -m \"$(commit_msg $test_encoding)\" &&\n+\t# \"git commit -m\" would break MinGW, as Windows refuse to pass\n+\t# $test_encoding encoded parameter to git.\n+\tcommit_msg $test_encoding | git -c \"i18n.commitEncoding=$test_encoding\" commit -a -F - &&\n \thead5=$(git rev-parse --verify HEAD)\n '\n # git log --pretty=oneline # to see those SHA1 involved\n@@ -334,7 +336,9 @@ test_expect_success 'redoing the last two commits should succeed' '\n \n \techo \"1st line 2nd file\" >secondfile &&\n \techo \"2nd line 2nd file\" >>secondfile &&\n-\tgit -c \"i18n.commitEncoding=$test_encoding\" commit -a -m \"$(commit_msg $test_encoding)\" &&\n+\t# \"git commit -m\" would break MinGW, as Windows refuse to pass\n+\t# $test_encoding encoded parameter to git.\n+\tcommit_msg $test_encoding | git -c \"i18n.commitEncoding=$test_encoding\" commit -a -F - &&\n \tcheck_changes $head5\n '\n \n-- \n2.0.0.9635.g0be03cb\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"246055","messageId":"20140715135345.GA21697@ucw.cz","threadId":"37099","inReplyTo":"1405431797-20899-1-git-send-email-kasal@ucw.cz","subject":"Re: [PATCH 0/3] fix test suite with mingw-unicode patches","fromName":"Stepan Kasal","fromEmail":"kasal@ucw.cz","sentAt":"2014-07-15T13:53:45Z","receivedAt":"2014-07-15T13:53:45Z","isPatch":true,"sender":{"key":"kasal@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/1481596?v=4"},"body":"Hello,\n\nI'm sorry that I have to reply to my own mail, but I forgot this:\n\n> Karsten Blees (2):\n>   Win32: Unicode file name support (except dirent)\n.. has this one squashed in:\n   Win32: fix detection of empty directories in is_dir_empty\nhttps://github.com/msysgit/git/commit/91db148\n\n>   Win32: Unicode file name support (dirent)\n\nBoth of theese patches are in msysgit for more than 2 years.\n\n> Pat Thoyts and Stepan Kasal(1):\n>   tests: do not pass iso8859-1 encoded parameter\n\nThis one is relatively new: replaces \"git commit -m\"\nby \"git commit -F -\" to work around a Windows bug^H^H^Hfeature.\n\nStepan\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"246073","messageId":"xmqq38e2wkkh.fsf@gitster.dls.corp.google.com","threadId":"37099","inReplyTo":"1405431797-20899-1-git-send-email-kasal@ucw.cz","subject":"Re: [PATCH 0/3] fix test suite with mingw-unicode patches","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-07-15T18:20:14Z","receivedAt":"2014-07-15T18:20:14Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Stepan Kasal <kasal@ucw.cz> writes:\n\n> Hello Hannes,\n> attached please find the patches that Karsten pointed out:\n>\n> 1) The unicode file name support was omitted from his unicode patch\n> series; my mistake, sorry.  There is still big part missing: support\n> for unicode environment; I can only hope the tests would choke on\n> that.\n>\n> 2) Windows cannot pass non-UTF parameters (commit messages in this\n> case): original patch by Pat Thoyts was extended to apply to other\n> similar cases: the commit msg is passed through stdin.\n>\n> If there are still problems remaining, please tell us.\n>\n> Thanks,\n> \tStepan\n>\n> Karsten Blees (2):\n>   Win32: Unicode file name support (except dirent)\n>   Win32: Unicode file name support (dirent)\n>\n> Pat Thoyts and Stepan Kasal(1):\n>   tests: do not pass iso8859-1 encoded parameter\n\nThanks.  I'll queue these and wait for Windows folks to respond.\nWith favourable feedback they can go directly from pu to master, I\nwould think.\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"246107","messageId":"53C5B0A1.4060502@gmail.com","threadId":"37099","inReplyTo":"xmqq38e2wkkh.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH 0/3] fix test suite with mingw-unicode patches","fromName":"Karsten Blees","fromEmail":"karsten.blees@gmail.com","sentAt":"2014-07-15T22:52:17Z","receivedAt":"2014-07-15T22:52:17Z","isPatch":true,"sender":{"key":"karsten.blees@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1111200?v=4"},"body":"Am 15.07.2014 20:20, schrieb Junio C Hamano:\n> Stepan Kasal <kasal@ucw.cz> writes:\n> \n>> Hello Hannes,\n>> attached please find the patches that Karsten pointed out:\n>>\n>> 1) The unicode file name support was omitted from his unicode patch\n>> series; my mistake, sorry.  There is still big part missing: support\n>> for unicode environment; I can only hope the tests would choke on\n>> that.\n>>\n>> 2) Windows cannot pass non-UTF parameters (commit messages in this\n>> case): original patch by Pat Thoyts was extended to apply to other\n>> similar cases: the commit msg is passed through stdin.\n>>\n>> If there are still problems remaining, please tell us.\n>>\n>> Thanks,\n>> \tStepan\n>>\n>> Karsten Blees (2):\n>>   Win32: Unicode file name support (except dirent)\n>>   Win32: Unicode file name support (dirent)\n>>\n>> Pat Thoyts and Stepan Kasal(1):\n>>   tests: do not pass iso8859-1 encoded parameter\n> \n> Thanks.  I'll queue these and wait for Windows folks to respond.\n> With favourable feedback they can go directly from pu to master, I\n> would think.\n> \n\nLooking good. After fixing the ELOOP and fchmod issues (see followup\npatches), there are 9 test failures left. Only one of these is\nenvironment related, and for the rest we have fixes in the msysgit\nfork:\n\n\n* t0081-line-buffer: 1\n\nUsing file descriptor other than 0, 1, 2.\nhttps://github.com/msysgit/git/commit/4940c51a\n\n\n* t0110-urlmatch-normalization: 1\n\nPassing binary data on the command line...would have to teach test-urlmatch-normalization.c to read from stdin or file.\nhttps://github.com/msysgit/git/commit/be0d6dee\n\n\n* t4036-format-patch-signer-mime: 1\n\nnot ok 4 - format with non ASCII signer name\n#\n#               GIT_COMMITTER_NAME=\"はまの ふにおう\" \\\n#               git format-patch -s --stdout -1 >output &&\n#               grep Content-Type output\n#\n\nPassing non-ASCII by environment variable, will be fixed by Unicode environment support.\n\n\n* t4201-shortlog: 3\n\nPassing binary data on the command line ('git-commit -m').\nhttps://github.com/msysgit/git/commit/3717ce1b\n\n\n* t4210-log-i18n: 2\n\nPassing binary data on the command line ('git log --grep=$latin1_e').\nhttps://github.com/msysgit/git/commit/dd2defa3\n\n\n* t7001-mv: 6\n\ncp -P fails in MinGW - perhaps use the long option forms (--no-dereference)?\nhttps://github.com/msysgit/git/commit/00764ca1\n\n\n* t8001-annotate/t8002-blame: 5\n\nMsys.dll thinks '-L/regex/' is an absolute path and expands to '-LC:/msysgit/regex/'.\nhttps://github.com/msysgit/git/commit/2d52168a\n\n\n* t8005-blame-i18n: 4\n\nPassing binary data on the command line ('git-commit --author -m').\nhttps://github.com/msysgit/git/commit/3717ce1b\n\n\n* t9902-completion: 2\n\nMust use 'pwd -W' to get Windows-style absolute paths.\nhttps://github.com/msysgit/git/commit/9b612448\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"246108","messageId":"53C5B0E7.4050706@gmail.com","threadId":"37099","inReplyTo":"53C5B0A1.4060502@gmail.com","subject":"[PATCH 1/2] MinGW: fix compile error due to missing ELOOP","fromName":"Karsten Blees","fromEmail":"karsten.blees@gmail.com","sentAt":"2014-07-15T22:53:27Z","receivedAt":"2014-07-15T22:53:27Z","isPatch":true,"sender":{"key":"karsten.blees@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1111200?v=4"},"body":"MinGW and MSVC before 2010 don't define ELOOP, use EMLINK (aka \"Too many\nlinks\") instead.\n\nSigned-off-by: Karsten Blees <blees@dcon.de>\n---\n compat/mingw.h | 3 +++\n 1 file changed, 3 insertions(+)\n\ndiff --git a/compat/mingw.h b/compat/mingw.h\nindex 405c08f..510530c 100644\n--- a/compat/mingw.h\n+++ b/compat/mingw.h\n@@ -35,6 +35,9 @@ typedef int socklen_t;\n #ifndef EWOULDBLOCK\n #define EWOULDBLOCK EAGAIN\n #endif\n+#ifndef ELOOP\n+#define ELOOP EMLINK\n+#endif\n #define SHUT_WR SD_SEND\n \n #define SIGHUP 1\n-- \n2.0.1.779.g26aeac4.dirty\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"246109","messageId":"53C5B126.6020404@gmail.com","threadId":"37099","inReplyTo":"53C5B0A1.4060502@gmail.com","subject":"[PATCH 2/2] config: use chmod() instead of fchmod()","fromName":"Karsten Blees","fromEmail":"karsten.blees@gmail.com","sentAt":"2014-07-15T22:54:30Z","receivedAt":"2014-07-15T22:54:30Z","isPatch":true,"sender":{"key":"karsten.blees@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1111200?v=4"},"body":"There is no fchmod() on native Windows platforms (MinGW and MSVC), and the\nequivalent Win32 API (SetFileInformationByHandle) requires Windows Vista.\n\nUse chmod() instead.\n\nSigned-off-by: Karsten Blees <blees@dcon.de>\n---\n config.c | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/config.c b/config.c\nindex ba882a1..9767c4b 100644\n--- a/config.c\n+++ b/config.c\n@@ -1636,8 +1636,8 @@ int git_config_set_multivar_in_file(const char *config_filename,\n \t\t\tMAP_PRIVATE, in_fd, 0);\n \t\tclose(in_fd);\n \n-\t\tif (fchmod(fd, st.st_mode & 07777) < 0) {\n-\t\t\terror(\"fchmod on %s failed: %s\",\n+\t\tif (chmod(lock->filename, st.st_mode & 07777) < 0) {\n+\t\t\terror(\"chmod on %s failed: %s\",\n \t\t\t\tlock->filename, strerror(errno));\n \t\t\tret = CONFIG_NO_WRITE;\n \t\t\tgoto out_free;\n@@ -1815,8 +1815,8 @@ int git_config_rename_section_in_file(const char *config_filename,\n \n \tfstat(fileno(config_file), &st);\n \n-\tif (fchmod(out_fd, st.st_mode & 07777) < 0) {\n-\t\tret = error(\"fchmod on %s failed: %s\",\n+\tif (chmod(lock->filename, st.st_mode & 07777) < 0) {\n+\t\tret = error(\"chmod on %s failed: %s\",\n \t\t\t\tlock->filename, strerror(errno));\n \t\tgoto out;\n \t}\n-- \n2.0.1.779.g26aeac4.dirty\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"246143","messageId":"20140715234257.GM12427@google.com","threadId":"37099","inReplyTo":"53C5B0E7.4050706@gmail.com","subject":"Re: [PATCH 1/2] MinGW: fix compile error due to missing ELOOP","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2014-07-15T23:42:57Z","receivedAt":"2014-07-15T23:42:57Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Karsten Blees wrote:\n\n> MinGW and MSVC before 2010 don't define ELOOP, use EMLINK (aka \"Too many\n> links\") instead.\n[...]\n> +#ifndef ELOOP\n> +#define ELOOP EMLINK\n> +#endif\n\nThis could use\n\n\t#define ELOOP WSAELOOP\n\nas an alternative.  But it shouldn't matter since git doesn't look for\nEMLINK anywhere (EMLINK = 31, WSAELOOP = wsabaseerr+62 = 10062).\n\nReviewed-by: Jonathan Nieder <jrnieder@gmail.com>\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"246145","messageId":"53C5BFF2.30001@gmail.com","threadId":"37099","inReplyTo":"20140715234257.GM12427@google.com","subject":"Re: [PATCH 1/2] MinGW: fix compile error due to missing ELOOP","fromName":"Karsten Blees","fromEmail":"karsten.blees@gmail.com","sentAt":"2014-07-15T23:57:38Z","receivedAt":"2014-07-15T23:57:38Z","isPatch":true,"sender":{"key":"karsten.blees@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1111200?v=4"},"body":"Am 16.07.2014 01:42, schrieb Jonathan Nieder:\n> Karsten Blees wrote:\n> \n>> MinGW and MSVC before 2010 don't define ELOOP, use EMLINK (aka \"Too many\n>> links\") instead.\n> [...]\n>> +#ifndef ELOOP\n>> +#define ELOOP EMLINK\n>> +#endif\n> \n> This could use\n> \n> \t#define ELOOP WSAELOOP\n> \n> as an alternative.  But it shouldn't matter since git doesn't look for\n> EMLINK anywhere (EMLINK = 31, WSAELOOP = wsabaseerr+62 = 10062).\n> \n> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>\n> \n\nIt matters when we report the error to the user (i.e. via die_errno):\n\nstrerror(EMLINK) -> \"Too many links\"\nstrerror(10062)  -> \"Unknown error\"\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"246148","messageId":"53C60E9C.3020604@kdbg.org","threadId":"37099","inReplyTo":"53C5B126.6020404@gmail.com","subject":"Re: [PATCH 2/2] config: use chmod() instead of fchmod()","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2014-07-16T05:33:16Z","receivedAt":"2014-07-16T05:33:16Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 16.07.2014 00:54, schrieb Karsten Blees:\n> There is no fchmod() on native Windows platforms (MinGW and MSVC), and the\n> equivalent Win32 API (SetFileInformationByHandle) requires Windows Vista.\n> \n> Use chmod() instead.\n> \n> Signed-off-by: Karsten Blees <blees@dcon.de>\n> ---\n>  config.c | 8 ++++----\n>  1 file changed, 4 insertions(+), 4 deletions(-)\n> \n> diff --git a/config.c b/config.c\n> index ba882a1..9767c4b 100644\n> --- a/config.c\n> +++ b/config.c\n> @@ -1636,8 +1636,8 @@ int git_config_set_multivar_in_file(const char *config_filename,\n>  \t\t\tMAP_PRIVATE, in_fd, 0);\n>  \t\tclose(in_fd);\n>  \n> -\t\tif (fchmod(fd, st.st_mode & 07777) < 0) {\n> -\t\t\terror(\"fchmod on %s failed: %s\",\n> +\t\tif (chmod(lock->filename, st.st_mode & 07777) < 0) {\n> +\t\t\terror(\"chmod on %s failed: %s\",\n>  \t\t\t\tlock->filename, strerror(errno));\n>  \t\t\tret = CONFIG_NO_WRITE;\n>  \t\t\tgoto out_free;\n> @@ -1815,8 +1815,8 @@ int git_config_rename_section_in_file(const char *config_filename,\n>  \n>  \tfstat(fileno(config_file), &st);\n>  \n> -\tif (fchmod(out_fd, st.st_mode & 07777) < 0) {\n> -\t\tret = error(\"fchmod on %s failed: %s\",\n> +\tif (chmod(lock->filename, st.st_mode & 07777) < 0) {\n> +\t\tret = error(\"chmod on %s failed: %s\",\n>  \t\t\t\tlock->filename, strerror(errno));\n>  \t\tgoto out;\n>  \t}\n> \n\nI assume you tested this patch on Windows. I am mildly surprised that\n(on Windows) chmod() works on a file that is still open.\n\n-- Hannes\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"246152","messageId":"20140716092959.GA378@ucw.cz","threadId":"37099","inReplyTo":"53C5B0A1.4060502@gmail.com","subject":"Re: [PATCH 0/3] fix test suite with mingw-unicode patches","fromName":"Stepan Kasal","fromEmail":"kasal@ucw.cz","sentAt":"2014-07-16T09:29:59Z","receivedAt":"2014-07-16T09:29:59Z","isPatch":true,"sender":{"key":"kasal@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/1481596?v=4"},"body":"Hello Karsten,\n\nthanks for your analysis.  Most of the patches you refer to are simply\nswitching off tests for MINGW; let me comment on the remaining ones:\n\n> * t0110-urlmatch-normalization: 1\n> \n> Passing binary data on the command line...would have to\n> teach test-urlmatch-normalization.c to read from stdin or file.\n> https://github.com/msysgit/git/commit/be0d6dee\n\nIndeed, that would be better solution.  For now, I'm going to submit the\nswitch-off patch you mention.\n\n> * t4036-format-patch-signer-mime: 1\n> \n> Passing non-ASCII by environment variable, will be fixed by Unicode\n> environment support.\n\nWill submit that patch series soon.\n\n> * t7001-mv: 6\n> cp -P fails in MinGW - perhaps use the long option forms (--no-dereference)?\n\n\"cp -P\" fails with our 2001-edition of cp, so msysgit had to revert:\nhttps://github.com/msysgit/git/commit/6d3e23d4\n\nBut I was ashamed to mention that upstream; and I hope mingwGitDevEnv is\ngoing to solve that.\n\n> * t8001-annotate/t8002-blame: 5\n> \n> Msys.dll thinks '-L/regex/' is an absolute path and expands to '-LC:/msysgit/regex/'.\n> https://github.com/msysgit/git/commit/2d52168a\n\nNice!  But I'm afraid the patch cannot be submitted upstream as it is.\n\nI think the hack could be automated by processing options \"-L*\" this way:\n    sed 'sX\\(^-L\\|,\\)\\^\\?/X&\\\\;*Xg'\nThen it would become only few lines at the top of the script, executed\non mingw only.\nI hope to submit the patch in this form soon.\n\nHave a nice day,\n\tStepan\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"246154","messageId":"53C659B0.8040306@gmail.com","threadId":"37099","inReplyTo":"53C60E9C.3020604@kdbg.org","subject":"Re: [PATCH 2/2] config: use chmod() instead of fchmod()","fromName":"Karsten Blees","fromEmail":"karsten.blees@gmail.com","sentAt":"2014-07-16T10:53:36Z","receivedAt":"2014-07-16T10:53:36Z","isPatch":true,"sender":{"key":"karsten.blees@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1111200?v=4"},"body":"Am 16.07.2014 07:33, schrieb Johannes Sixt:\n> Am 16.07.2014 00:54, schrieb Karsten Blees:\n>> There is no fchmod() on native Windows platforms (MinGW and MSVC), and the\n>> equivalent Win32 API (SetFileInformationByHandle) requires Windows Vista.\n>>\n>> Use chmod() instead.\n>>\n>> Signed-off-by: Karsten Blees <blees@dcon.de>\n>> ---\n>>  config.c | 8 ++++----\n>>  1 file changed, 4 insertions(+), 4 deletions(-)\n>>\n>> diff --git a/config.c b/config.c\n>> index ba882a1..9767c4b 100644\n>> --- a/config.c\n>> +++ b/config.c\n>> @@ -1636,8 +1636,8 @@ int git_config_set_multivar_in_file(const char *config_filename,\n>>  \t\t\tMAP_PRIVATE, in_fd, 0);\n>>  \t\tclose(in_fd);\n>>  \n>> -\t\tif (fchmod(fd, st.st_mode & 07777) < 0) {\n>> -\t\t\terror(\"fchmod on %s failed: %s\",\n>> +\t\tif (chmod(lock->filename, st.st_mode & 07777) < 0) {\n>> +\t\t\terror(\"chmod on %s failed: %s\",\n>>  \t\t\t\tlock->filename, strerror(errno));\n>>  \t\t\tret = CONFIG_NO_WRITE;\n>>  \t\t\tgoto out_free;\n>> @@ -1815,8 +1815,8 @@ int git_config_rename_section_in_file(const char *config_filename,\n>>  \n>>  \tfstat(fileno(config_file), &st);\n>>  \n>> -\tif (fchmod(out_fd, st.st_mode & 07777) < 0) {\n>> -\t\tret = error(\"fchmod on %s failed: %s\",\n>> +\tif (chmod(lock->filename, st.st_mode & 07777) < 0) {\n>> +\t\tret = error(\"chmod on %s failed: %s\",\n>>  \t\t\t\tlock->filename, strerror(errno));\n>>  \t\tgoto out;\n>>  \t}\n>>\n> \n> I assume you tested this patch on Windows. I am mildly surprised that\n> (on Windows) chmod() works on a file that is still open.\n> \n> -- Hannes\n> \n\nYes, file attributes can be set independently of open files. In fact, existing\ncode in git already does that in many places (via adjust_shared_perm(), which\nis typically called while the file is open).\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"246156","messageId":"53C65B6C.3020304@virtuell-zuhause.de","threadId":"37099","inReplyTo":"20140716092959.GA378@ucw.cz","subject":"Re: [PATCH 0/3] fix test suite with mingw-unicode patches","fromName":"Thomas Braun","fromEmail":"thomas.braun@virtuell-zuhause.de","sentAt":"2014-07-16T11:01:00Z","receivedAt":"2014-07-16T11:01:00Z","isPatch":true,"sender":{"key":"thomas.braun@virtuell-zuhause.de","avatar":"https://avatars.githubusercontent.com/u/1185677?v=4"},"body":"Am 16.07.2014 11:29, schrieb Stepan Kasal:\n>> * t7001-mv: 6\n>> cp -P fails in MinGW - perhaps use the long option forms (--no-dereference)?\n> \n> \"cp -P\" fails with our 2001-edition of cp, so msysgit had to revert:\n> https://github.com/msysgit/git/commit/6d3e23d4\n> \n> But I was ashamed to mention that upstream; and I hope mingwGitDevEnv is\n> going to solve that.\n\nYes it does. cp in mingwGitDevEnv is from coreutils 5.97 and knows about -P.\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"246173","messageId":"xmqqmwc9ryhc.fsf@gitster.dls.corp.google.com","threadId":"37099","inReplyTo":"53C5B0E7.4050706@gmail.com","subject":"Re: [PATCH 1/2] MinGW: fix compile error due to missing ELOOP","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-07-16T17:43:11Z","receivedAt":"2014-07-16T17:43:11Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Karsten Blees <karsten.blees@gmail.com> writes:\n\n> MinGW and MSVC before 2010 don't define ELOOP, use EMLINK (aka \"Too many\n> links\") instead.\n>\n> Signed-off-by: Karsten Blees <blees@dcon.de>\n> ---\n\nThanks; will apply directly to 'master'.\n\n>  compat/mingw.h | 3 +++\n>  1 file changed, 3 insertions(+)\n>\n> diff --git a/compat/mingw.h b/compat/mingw.h\n> index 405c08f..510530c 100644\n> --- a/compat/mingw.h\n> +++ b/compat/mingw.h\n> @@ -35,6 +35,9 @@ typedef int socklen_t;\n>  #ifndef EWOULDBLOCK\n>  #define EWOULDBLOCK EAGAIN\n>  #endif\n> +#ifndef ELOOP\n> +#define ELOOP EMLINK\n> +#endif\n>  #define SHUT_WR SD_SEND\n>  \n>  #define SIGHUP 1\n> -- \n> 2.0.1.779.g26aeac4.dirty\n>\n> -- \n"},{"id":"246192","messageId":"xmqqlhrtq7a7.fsf@gitster.dls.corp.google.com","threadId":"37099","inReplyTo":"53C5B126.6020404@gmail.com","subject":"Re: [PATCH 2/2] config: use chmod() instead of fchmod()","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-07-16T22:16:00Z","receivedAt":"2014-07-16T22:16:00Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Karsten Blees <karsten.blees@gmail.com> writes:\n\n> There is no fchmod() on native Windows platforms (MinGW and MSVC), and the\n> equivalent Win32 API (SetFileInformationByHandle) requires Windows Vista.\n>\n> Use chmod() instead.\n>\n> Signed-off-by: Karsten Blees <blees@dcon.de>\n> ---\n\nI am wondering if it is saner to just revert the fchmod() patch and\nreplace it with something along the lines of\n\nhttp://thread.gmane.org/gmane.comp.version-control.git/251682/focus=253219\n\nHaving said that, these are the only two callers of fchmod()\ncurrently in our code base, so I'll queue this patch to allow us to\nkick the problem-can down the road ;-)\n\nThanks.\n\n>  config.c | 8 ++++----\n>  1 file changed, 4 insertions(+), 4 deletions(-)\n>\n> diff --git a/config.c b/config.c\n> index ba882a1..9767c4b 100644\n> --- a/config.c\n> +++ b/config.c\n> @@ -1636,8 +1636,8 @@ int git_config_set_multivar_in_file(const char *config_filename,\n>  \t\t\tMAP_PRIVATE, in_fd, 0);\n>  \t\tclose(in_fd);\n>  \n> -\t\tif (fchmod(fd, st.st_mode & 07777) < 0) {\n> -\t\t\terror(\"fchmod on %s failed: %s\",\n> +\t\tif (chmod(lock->filename, st.st_mode & 07777) < 0) {\n> +\t\t\terror(\"chmod on %s failed: %s\",\n>  \t\t\t\tlock->filename, strerror(errno));\n>  \t\t\tret = CONFIG_NO_WRITE;\n>  \t\t\tgoto out_free;\n> @@ -1815,8 +1815,8 @@ int git_config_rename_section_in_file(const char *config_filename,\n>  \n>  \tfstat(fileno(config_file), &st);\n>  \n> -\tif (fchmod(out_fd, st.st_mode & 07777) < 0) {\n> -\t\tret = error(\"fchmod on %s failed: %s\",\n> +\tif (chmod(lock->filename, st.st_mode & 07777) < 0) {\n> +\t\tret = error(\"chmod on %s failed: %s\",\n>  \t\t\t\tlock->filename, strerror(errno));\n>  \t\tgoto out;\n>  \t}\n> -- \n> 2.0.1.779.g26aeac4.dirty\n>\n> -- \n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"246219","messageId":"53C79016.2020303@gmail.com","threadId":"37099","inReplyTo":"xmqqlhrtq7a7.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH 2/2] config: use chmod() instead of fchmod()","fromName":"Karsten Blees","fromEmail":"karsten.blees@gmail.com","sentAt":"2014-07-17T08:57:58Z","receivedAt":"2014-07-17T08:57:58Z","isPatch":true,"sender":{"key":"karsten.blees@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1111200?v=4"},"body":"Am 17.07.2014 00:16, schrieb Junio C Hamano:\n> Karsten Blees <karsten.blees@gmail.com> writes:\n> \n>> There is no fchmod() on native Windows platforms (MinGW and MSVC), and the\n>> equivalent Win32 API (SetFileInformationByHandle) requires Windows Vista.\n>>\n>> Use chmod() instead.\n>>\n>> Signed-off-by: Karsten Blees <blees@dcon.de>\n>> ---\n> \n> I am wondering if it is saner to just revert the fchmod() patch and\n> replace it with something along the lines of\n> \n> http://thread.gmane.org/gmane.comp.version-control.git/251682/focus=253219\n> \n\nI also think it makes a lot of sense to handle permissions centrally.\n\nHowever, with this patch, the permissions of the target file will\nadditionally be limited by umask (by passing them to open()), and then\noverridden completely if core.sharedRepository is set.\n\nPerhaps the lockfile API should respect the location of the lock files\n(i.e. use core.sharedRepository in .git, 0666 in the work-tree, and\ncopy permissions anywhere else).\n\nAnother thing I find strange is that, by doing copy/replace, git silently\noverwrites readonly files. If we grab the permissions from the source\nfile anyway, we should perhaps add 'if (!(perms & 0222)) error(\"file\nis readonly\");', or even 'access(filename, W_OK)'?\n\n> Having said that, these are the only two callers of fchmod()\n> currently in our code base, so I'll queue this patch to allow us to\n> kick the problem-can down the road ;-)\n> \n\nThanks.\n"},{"id":"246232","messageId":"1405611425-10009-1-git-send-email-kasal@ucw.cz","threadId":"37099","inReplyTo":"20140716092959.GA378@ucw.cz","subject":"[PATCH 0/6] mingw test fixes","fromName":"Stepan Kasal","fromEmail":"kasal@ucw.cz","sentAt":"2014-07-17T15:36:59Z","receivedAt":"2014-07-17T15:36:59Z","isPatch":true,"sender":{"key":"kasal@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/1481596?v=4"},"body":"Hello,\nthis is a collection of quality test suite fixes, hand picked with care,\nfollowing the expert advice by Karsten.  :-)\n\nMost of them just switch off the tests on MinGW, one uses `pwd -W' to get\nthe reeal windows path.  All of these are time proven, they have been in\nmsysgit since Dec 2013, at least.   ;-)\n\nThe fix for t8001,2 (annotate, blame) was created in Sep 2013 in the\nstraightforward form: editing all the regexps in the long test file:\nhttps://github.com/msysgit/git/commit/2d52168a\n\nI have replaced it by a more tricky version that changes each -L option on\nthe fly, just before it is passed to the executable.\nThis is new code, but I beleive it is better suited for the common git\nsources.\n\nJohannes Schindelin (2):\n  MinGW: Skip test redirecting to fd 4\n  Disable t0110's high-bit test on Windows\n\nKarsten Blees (2):\n  MinGW: disable legacy encoding tests\n  t800[12]: work around MSys limitation\n\nPat Thoyts (2):\n  t4210: skip command-line encoding tests on mingw\n  t9902: mingw-specific fix for gitfile link files\n\n t/annotate-tests.sh               | 12 ++++++++++++\n t/t0081-line-buffer.sh            |  2 +-\n t/t0110-urlmatch-normalization.sh |  2 +-\n t/t3901-i18n-patch.sh             | 19 +++++++++++--------\n t/t4201-shortlog.sh               |  6 +++---\n t/t4210-log-i18n.sh               |  4 ++--\n t/t8005-blame-i18n.sh             |  8 ++++----\n t/t9902-completion.sh             | 17 +++++++++++++----\n 8 files changed, 47 insertions(+), 23 deletions(-)\n\n-- \n2.0.0.9635.g0be03cb\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"246231","messageId":"1405611425-10009-2-git-send-email-kasal@ucw.cz","threadId":"37099","inReplyTo":"1405611425-10009-1-git-send-email-kasal@ucw.cz","subject":"[PATCH 1/6] MinGW: Skip test redirecting to fd 4","fromName":"Stepan Kasal","fromEmail":"kasal@ucw.cz","sentAt":"2014-07-17T15:37:00Z","receivedAt":"2014-07-17T15:37:00Z","isPatch":true,"sender":{"key":"kasal@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/1481596?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\n... because that does not work in MinGW.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Stepan Kasal <kasal@ucw.cz>\n---\n t/t0081-line-buffer.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t0081-line-buffer.sh b/t/t0081-line-buffer.sh\nindex bd83ed3..25dba00 100755\n--- a/t/t0081-line-buffer.sh\n+++ b/t/t0081-line-buffer.sh\n@@ -29,7 +29,7 @@ test_expect_success '0-length read, send along greeting' '\n \ttest_cmp expect actual\n '\n \n-test_expect_success 'read from file descriptor' '\n+test_expect_success NOT_MINGW 'read from file descriptor' '\n \trm -f input &&\n \techo hello >expect &&\n \techo hello >input &&\n-- \n2.0.0.9635.g0be03cb\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"246234","messageId":"1405611425-10009-3-git-send-email-kasal@ucw.cz","threadId":"37099","inReplyTo":"1405611425-10009-1-git-send-email-kasal@ucw.cz","subject":"[PATCH 2/6] Disable t0110's high-bit test on Windows","fromName":"Stepan Kasal","fromEmail":"kasal@ucw.cz","sentAt":"2014-07-17T15:37:01Z","receivedAt":"2014-07-17T15:37:01Z","isPatch":true,"sender":{"key":"kasal@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/1481596?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThe bash Git for Windows uses (i.e. the MSys bash) cannot pass\ncommand-line arguments with high bits set verbatim to non-MSys programs,\nbut instead converts those characters with high bits set to their hex\nrepresentation.\n\nFor example, when running\n\n\tstrings \"$(echo -e '\\x80')\"\n\n(where strings.exe is a MinGW program, not an MSys one) it will complain\nabout not finding the file called \"80\".\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Stepan Kasal <kasal@ucw.cz>\n---\n t/t0110-urlmatch-normalization.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t0110-urlmatch-normalization.sh b/t/t0110-urlmatch-normalization.sh\nindex 8d6096d..bcbb825 100755\n--- a/t/t0110-urlmatch-normalization.sh\n+++ b/t/t0110-urlmatch-normalization.sh\n@@ -117,7 +117,7 @@ test_expect_success 'url general escapes' '\n \ttest \"$(test-urlmatch-normalization -p \"X://W?'\\!'\")\" = \"x://w/?'\\!'\"\n '\n \n-test_expect_success 'url high-bit escapes' '\n+test_expect_success !MINGW 'url high-bit escapes' '\n \ttest \"$(test-urlmatch-normalization -p \"$(cat \"$tu-1\")\")\" = \"x://q/%01%02%03%04%05%06%07%08%0E%0F%10%11%12\" &&\n \ttest \"$(test-urlmatch-normalization -p \"$(cat \"$tu-2\")\")\" = \"x://q/%13%14%15%16%17%18%19%1B%1C%1D%1E%1F%7F\" &&\n \ttest \"$(test-urlmatch-normalization -p \"$(cat \"$tu-3\")\")\" = \"x://q/%80%81%82%83%84%85%86%87%88%89%8A%8B%8C%8D%8E%8F\" &&\n-- \n2.0.0.9635.g0be03cb\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"246229","messageId":"1405611425-10009-4-git-send-email-kasal@ucw.cz","threadId":"37099","inReplyTo":"1405611425-10009-1-git-send-email-kasal@ucw.cz","subject":"[PATCH 3/6] MinGW: disable legacy encoding tests","fromName":"Stepan Kasal","fromEmail":"kasal@ucw.cz","sentAt":"2014-07-17T15:37:02Z","receivedAt":"2014-07-17T15:37:02Z","isPatch":true,"sender":{"key":"kasal@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/1481596?v=4"},"body":"From: Karsten Blees <blees@dcon.de>\n\nOn Windows, all native APIs are Unicode-based. It is impossible to pass\nlegacy encoded byte arrays to a process via command line or environment\nvariables. Disable the tests that try to do so.\n\nIn t3901, most tests still work if we don't mess up the repository encoding\nin setup, so don't switch to ISO-8859-1 on MinGW.\n\nNote that i18n tests that do their encoding tricks via encoded files (such\nas t3900) are not affected by this.\n\nSigned-off-by: Karsten Blees <blees@dcon.de>\nSigned-off-by: Stepan Kasal <kasal@ucw.cz>\n---\n t/t3901-i18n-patch.sh | 19 +++++++++++--------\n t/t4201-shortlog.sh   |  6 +++---\n t/t8005-blame-i18n.sh |  8 ++++----\n 3 files changed, 18 insertions(+), 15 deletions(-)\n\ndiff --git a/t/t3901-i18n-patch.sh b/t/t3901-i18n-patch.sh\nindex 31a5770..55c8a2f 100755\n--- a/t/t3901-i18n-patch.sh\n+++ b/t/t3901-i18n-patch.sh\n@@ -54,10 +54,13 @@ test_expect_success setup '\n \tgit add yours &&\n \tgit commit -s -m \"Second on side\" &&\n \n-\t# the second one on the side branch is ISO-8859-1\n-\tgit config i18n.commitencoding ISO8859-1 &&\n-\t# use author and committer name in ISO-8859-1 to match it.\n-\t. \"$TEST_DIRECTORY\"/t3901-8859-1.txt &&\n+\tif test_have_prereq NOT_MINGW\n+\tthen\n+\t\t# the second one on the side branch is ISO-8859-1\n+\t\tgit config i18n.commitencoding ISO8859-1 &&\n+\t\t# use author and committer name in ISO-8859-1 to match it.\n+\t\t. \"$TEST_DIRECTORY\"/t3901-8859-1.txt\n+\tfi &&\n \ttest_tick &&\n \techo Yet another >theirs &&\n \tgit add theirs &&\n@@ -119,7 +122,7 @@ test_expect_success 'rebase (U/L)' '\n \tcheck_encoding 2\n '\n \n-test_expect_success 'rebase (L/L)' '\n+test_expect_success NOT_MINGW 'rebase (L/L)' '\n \t# In this test we want ISO-8859-1 encoded commits as the result\n \tgit config i18n.commitencoding ISO8859-1 &&\n \tgit config i18n.logoutputencoding ISO8859-1 &&\n@@ -131,7 +134,7 @@ test_expect_success 'rebase (L/L)' '\n \tcheck_encoding 2 8859\n '\n \n-test_expect_success 'rebase (L/U)' '\n+test_expect_success NOT_MINGW 'rebase (L/U)' '\n \t# This is pathological -- use UTF-8 as intermediate form\n \t# to get ISO-8859-1 results.\n \tgit config i18n.commitencoding ISO8859-1 &&\n@@ -159,7 +162,7 @@ test_expect_success 'cherry-pick(U/U)' '\n \tcheck_encoding 3\n '\n \n-test_expect_success 'cherry-pick(L/L)' '\n+test_expect_success NOT_MINGW 'cherry-pick(L/L)' '\n \t# Both the commitencoding and logoutputencoding is set to ISO-8859-1\n \n \tgit config i18n.commitencoding ISO8859-1 &&\n@@ -189,7 +192,7 @@ test_expect_success 'cherry-pick(U/L)' '\n \tcheck_encoding 3\n '\n \n-test_expect_success 'cherry-pick(L/U)' '\n+test_expect_success NOT_MINGW 'cherry-pick(L/U)' '\n \t# Again, the commitencoding is set to ISO-8859-1 but\n \t# logoutputencoding is set to UTF-8.\n \ndiff --git a/t/t4201-shortlog.sh b/t/t4201-shortlog.sh\nindex 97fcb31..565c020 100755\n--- a/t/t4201-shortlog.sh\n+++ b/t/t4201-shortlog.sh\n@@ -93,7 +93,7 @@ test_expect_success 'output from user-defined format is re-wrapped' '\n \ttest_cmp expect log.predictable\n '\n \n-test_expect_success 'shortlog wrapping' '\n+test_expect_success NOT_MINGW 'shortlog wrapping' '\n \tcat >expect <<\\EOF &&\n A U Thor (5):\n       Test\n@@ -114,7 +114,7 @@ EOF\n \ttest_cmp expect out\n '\n \n-test_expect_success 'shortlog from non-git directory' '\n+test_expect_success NOT_MINGW 'shortlog from non-git directory' '\n \tgit log HEAD >log &&\n \tGIT_DIR=non-existing git shortlog -w <log >out &&\n \ttest_cmp expect out\n@@ -159,7 +159,7 @@ $DSCHO (2):\n \n EOF\n \n-test_expect_success 'shortlog encoding' '\n+test_expect_success NOT_MINGW 'shortlog encoding' '\n \tgit reset --hard \"$commit\" &&\n \tgit config --unset i18n.commitencoding &&\n \techo 2 > a1 &&\ndiff --git a/t/t8005-blame-i18n.sh b/t/t8005-blame-i18n.sh\nindex cb39055..a6e73d0 100755\n--- a/t/t8005-blame-i18n.sh\n+++ b/t/t8005-blame-i18n.sh\n@@ -33,7 +33,7 @@ author $SJIS_NAME\n summary $SJIS_MSG\n EOF\n \n-test_expect_success \\\n+test_expect_success NOT_MINGW \\\n \t'blame respects i18n.commitencoding' '\n \tgit blame --incremental file | \\\n \t\tegrep \"^(author|summary) \" > actual &&\n@@ -49,7 +49,7 @@ author $EUC_JAPAN_NAME\n summary $EUC_JAPAN_MSG\n EOF\n \n-test_expect_success \\\n+test_expect_success NOT_MINGW \\\n \t'blame respects i18n.logoutputencoding' '\n \tgit config i18n.logoutputencoding eucJP &&\n \tgit blame --incremental file | \\\n@@ -66,7 +66,7 @@ author $UTF8_NAME\n summary $UTF8_MSG\n EOF\n \n-test_expect_success \\\n+test_expect_success NOT_MINGW \\\n \t'blame respects --encoding=UTF-8' '\n \tgit blame --incremental --encoding=UTF-8 file | \\\n \t\tegrep \"^(author|summary) \" > actual &&\n@@ -82,7 +82,7 @@ author $UTF8_NAME\n summary $UTF8_MSG\n EOF\n \n-test_expect_success \\\n+test_expect_success NOT_MINGW \\\n \t'blame respects --encoding=none' '\n \tgit blame --incremental --encoding=none file | \\\n \t\tegrep \"^(author|summary) \" > actual &&\n-- \n2.0.0.9635.g0be03cb\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"246235","messageId":"1405611425-10009-5-git-send-email-kasal@ucw.cz","threadId":"37099","inReplyTo":"1405611425-10009-1-git-send-email-kasal@ucw.cz","subject":"[PATCH 4/6] t4210: skip command-line encoding tests on mingw","fromName":"Stepan Kasal","fromEmail":"kasal@ucw.cz","sentAt":"2014-07-17T15:37:03Z","receivedAt":"2014-07-17T15:37:03Z","isPatch":true,"sender":{"key":"kasal@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/1481596?v=4"},"body":"From: Pat Thoyts <patthoyts@users.sourceforge.net>\n\nOn Windows the application command line is provided as unicode and in\nmingw-git we convert that to utf-8. So these tests that require a iso-8859-1\ninput are being subverted by the encoding transformations we perform and\nshould be skipped.\n\nSigned-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>\nSigned-off-by: Stepan Kasal <kasal@ucw.cz>\n---\n t/t4210-log-i18n.sh | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t4210-log-i18n.sh b/t/t4210-log-i18n.sh\nindex 52a7472..9110404 100755\n--- a/t/t4210-log-i18n.sh\n+++ b/t/t4210-log-i18n.sh\n@@ -34,7 +34,7 @@ test_expect_success 'log --grep searches in log output encoding (utf8)' '\n \ttest_cmp expect actual\n '\n \n-test_expect_success 'log --grep searches in log output encoding (latin1)' '\n+test_expect_success NOT_MINGW 'log --grep searches in log output encoding (latin1)' '\n \tcat >expect <<-\\EOF &&\n \tlatin1\n \tutf8\n@@ -43,7 +43,7 @@ test_expect_success 'log --grep searches in log output encoding (latin1)' '\n \ttest_cmp expect actual\n '\n \n-test_expect_success 'log --grep does not find non-reencoded values (utf8)' '\n+test_expect_success NOT_MINGW 'log --grep does not find non-reencoded values (utf8)' '\n \t>expect &&\n \tgit log --encoding=utf8 --format=%s --grep=$latin1_e >actual &&\n \ttest_cmp expect actual\n-- \n2.0.0.9635.g0be03cb\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"246230","messageId":"1405611425-10009-6-git-send-email-kasal@ucw.cz","threadId":"37099","inReplyTo":"1405611425-10009-1-git-send-email-kasal@ucw.cz","subject":"[PATCH 5/6] t9902: mingw-specific fix for gitfile link files","fromName":"Stepan Kasal","fromEmail":"kasal@ucw.cz","sentAt":"2014-07-17T15:37:04Z","receivedAt":"2014-07-17T15:37:04Z","isPatch":true,"sender":{"key":"kasal@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/1481596?v=4"},"body":"From: Pat Thoyts <patthoyts@users.sourceforge.net>\n\nThe path in a .git platform independent link file needs to be absolute\nand under mingw we need it to be a windows type path, not a unix style\npath so it should start with a drive letter and not a /.\n\nSigned-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>\nSigned-off-by: Stepan Kasal <kasal@ucw.cz>\n---\n t/t9902-completion.sh | 17 +++++++++++++----\n 1 file changed, 13 insertions(+), 4 deletions(-)\n\ndiff --git a/t/t9902-completion.sh b/t/t9902-completion.sh\nindex 1d1c106..f10a752 100755\n--- a/t/t9902-completion.sh\n+++ b/t/t9902-completion.sh\n@@ -212,9 +212,18 @@ test_expect_success '__gitdir - non-existing $GIT_DIR' '\n \t)\n '\n \n+function pwd_P_W () {\n+\tif test_have_prereq MINGW\n+\tthen\n+\t\tpwd -W\n+\telse\n+\t\tpwd -P\n+\tfi\n+}\n+\n test_expect_success '__gitdir - gitfile in cwd' '\n-\techo \"$(pwd -P)/otherrepo/.git\" >expected &&\n-\techo \"gitdir: $TRASH_DIRECTORY/otherrepo/.git\" >subdir/.git &&\n+\techo \"$(pwd_P_W)/otherrepo/.git\" >expected &&\n+\techo \"gitdir: $(pwd_P_W)/otherrepo/.git\" >subdir/.git &&\n \ttest_when_finished \"rm -f subdir/.git\" &&\n \t(\n \t\tcd subdir &&\n@@ -224,8 +233,8 @@ test_expect_success '__gitdir - gitfile in cwd' '\n '\n \n test_expect_success '__gitdir - gitfile in parent' '\n-\techo \"$(pwd -P)/otherrepo/.git\" >expected &&\n-\techo \"gitdir: $TRASH_DIRECTORY/otherrepo/.git\" >subdir/.git &&\n+\techo \"$(pwd_P_W)/otherrepo/.git\" >expected &&\n+\techo \"gitdir: $(pwd_P_W)/otherrepo/.git\" >subdir/.git &&\n \ttest_when_finished \"rm -f subdir/.git\" &&\n \t(\n \t\tcd subdir/subsubdir &&\n-- \n2.0.0.9635.g0be03cb\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"246233","messageId":"1405611425-10009-7-git-send-email-kasal@ucw.cz","threadId":"37099","inReplyTo":"1405611425-10009-1-git-send-email-kasal@ucw.cz","subject":"[PATCH 6/6] t800[12]: work around MSys limitation","fromName":"Stepan Kasal","fromEmail":"kasal@ucw.cz","sentAt":"2014-07-17T15:37:05Z","receivedAt":"2014-07-17T15:37:05Z","isPatch":true,"sender":{"key":"kasal@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/1481596?v=4"},"body":"From: Karsten Blees <blees@dcon.de>\n\nMSys works very hard to convert Unix-style paths into DOS-style ones.\n*Very* hard.\n\nSo hard, indeed, that\n\n\tgit blame -L/hello/,/green/\n\nis translated into something like\n\n\tgit blame -LC:/msysgit/hello/,C:/msysgit/green/\n\nAs seen in msys_p2w in src\\msys\\msys\\rt\\src\\winsup\\cygwin\\path.cc, line\n3204ff:\n\n\tcase '-':\n\t  //\n\t  // here we check for POSIX paths as attributes to a POSIX switch.\n\t  //\n\t...\n\nseemingly absolute POSIX paths in single-letter options get expanded by\nmsys.dll unless they contain '=' or ';'.\n\nSo a quick and very dirty fix is to use '-L/;*evil/'. (Using an equal sign\nworks only when it is before a comma, so in the above example, /=*green/\nwould still be converted to a DOS-style path.)\n\nThe -L mangling can be done by the script, just before the parameter is\npassed to the executable.  This version does not modify the body of the\ntests and is active on MinGW only.\n\nCommit-message-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nAuthor: Stepan Kasal <kasal@ucw.cz>\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Stepan Kasal <kasal@ucw.cz>\n---\n t/annotate-tests.sh | 12 ++++++++++++\n 1 file changed, 12 insertions(+)\n\ndiff --git a/t/annotate-tests.sh b/t/annotate-tests.sh\nindex 304c7b7..071e4d7 100644\n--- a/t/annotate-tests.sh\n+++ b/t/annotate-tests.sh\n@@ -1,6 +1,17 @@\n # This file isn't used as a test script directly, instead it is\n # sourced from t8001-annotate.sh and t8002-blame.sh.\n \n+if test_have_prereq MINGW\n+then\n+  sanitize_L () {\n+\techo \"$1\" | sed 'sX\\(^-L\\|,\\)\\^\\?/X&\\\\;*Xg'\n+  }\n+else\n+  sanitize_L () {\n+\techo \"$1\"\n+  }\n+fi\n+\n check_count () {\n \thead= &&\n \tfile='file' &&\n@@ -10,6 +21,7 @@ check_count () {\n \t\tcase \"$1\" in\n \t\t-h) head=\"$2\"; shift; shift ;;\n \t\t-f) file=\"$2\"; shift; shift ;;\n+\t\t-L*) options=\"$options $(sanitize_L \"$1\")\"; shift ;;\n \t\t-*) options=\"$options $1\"; shift ;;\n \t\t*) break ;;\n \t\tesac\n-- \n2.0.0.9635.g0be03cb\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"246258","messageId":"53C813D2.8070701@gmail.com","threadId":"37099","inReplyTo":"1405611425-10009-3-git-send-email-kasal@ucw.cz","subject":"Re: [PATCH 2/6] Disable t0110's high-bit test on Windows","fromName":"Karsten Blees","fromEmail":"karsten.blees@gmail.com","sentAt":"2014-07-17T18:20:02Z","receivedAt":"2014-07-17T18:20:02Z","isPatch":true,"sender":{"key":"karsten.blees@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1111200?v=4"},"body":"Am 17.07.2014 17:37, schrieb Stepan Kasal:\n> From: Johannes Schindelin <johannes.schindelin@gmx.de>\n> \n> The bash Git for Windows uses (i.e. the MSys bash) cannot pass\n> command-line arguments with high bits set verbatim to non-MSys programs,\n> but instead converts those characters with high bits set to their hex\n> representation.\n> \n\nThe description is not entirely correct...the Unicode-enabled MSYS.dll\nexpects the command line to be UTF-8. Only *invalid* UTF-8 is converted\nto hex code for convenience. So its not the high bits that cause trouble,\nbut specifying 0x80 without proper UTF-8 lead byte.\n\nI believe the last line of the test may actually work:\n\ntest \"$(test-urlmatch-normalization -p \"$(cat \"$tu-11\")\")\" = \"x://q/%C2%80%DF%BF%E0%A0%80%EF%BF%BD%F0%90%80%80%F0%AF%BF%BD\"\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"246260","messageId":"xmqqbnsnq14j.fsf@gitster.dls.corp.google.com","threadId":"37099","inReplyTo":"1405611425-10009-2-git-send-email-kasal@ucw.cz","subject":"Re: [PATCH 1/6] MinGW: Skip test redirecting to fd 4","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-07-17T18:41:16Z","receivedAt":"2014-07-17T18:41:16Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Stepan Kasal <kasal@ucw.cz> writes:\n\n> From: Johannes Schindelin <johannes.schindelin@gmx.de>\n>\n> ... because that does not work in MinGW.\n>\n> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> Signed-off-by: Stepan Kasal <kasal@ucw.cz>\n> ---\n>  t/t0081-line-buffer.sh | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/t/t0081-line-buffer.sh b/t/t0081-line-buffer.sh\n> index bd83ed3..25dba00 100755\n> --- a/t/t0081-line-buffer.sh\n> +++ b/t/t0081-line-buffer.sh\n> @@ -29,7 +29,7 @@ test_expect_success '0-length read, send along greeting' '\n>  \ttest_cmp expect actual\n>  '\n>  \n> -test_expect_success 'read from file descriptor' '\n> +test_expect_success NOT_MINGW 'read from file descriptor' '\n>  \trm -f input &&\n>  \techo hello >expect &&\n>  \techo hello >input &&\n\nHmm, the point of this test seems to be to exercise buffer_fdinit(),\ninstead of buffer_init(), and the file descriptor does not have to\nbe \"4\" for the purpose of the test, no?\n\nIs what is broken on MinGW redirecting arbitrary file descrptors?\nIf that is not the case, wouldn't the following a good enough (or\nbetter) replacement, I wonder?\n\n t/t0081-line-buffer.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t0081-line-buffer.sh b/t/t0081-line-buffer.sh\nindex bd83ed3..881789a 100755\n--- a/t/t0081-line-buffer.sh\n+++ b/t/t0081-line-buffer.sh\n@@ -34,7 +34,6 @@ test_expect_success 'read from file descriptor' '\n \techo hello >expect &&\n \techo hello >input &&\n-\techo copy 6 |\n-\ttest-line-buffer \"&4\" 4<input >actual &&\n+\ttest-line-buffer \"&0\" <input >actual &&\n \ttest_cmp expect actual\n '\n \n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"246268","messageId":"alpine.DEB.1.00.1407172205390.3456@s15462909.onlinehome-server.info","threadId":"37099","inReplyTo":"xmqqbnsnq14j.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH 1/6] MinGW: Skip test redirecting to fd 4","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2014-07-17T20:06:41Z","receivedAt":"2014-07-17T20:06:41Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Thu, 17 Jul 2014, Junio C Hamano wrote:\n\n> Is what is broken on MinGW redirecting arbitrary file descrptors?\n\nIIRC that was exactly the problem.\n\n> diff --git a/t/t0081-line-buffer.sh b/t/t0081-line-buffer.sh\n> index bd83ed3..881789a 100755\n> --- a/t/t0081-line-buffer.sh\n> +++ b/t/t0081-line-buffer.sh\n> @@ -34,7 +34,6 @@ test_expect_success 'read from file descriptor' '\n>  \techo hello >expect &&\n>  \techo hello >input &&\n> -\techo copy 6 |\n> -\ttest-line-buffer \"&4\" 4<input >actual &&\n> +\ttest-line-buffer \"&0\" <input >actual &&\n>  \ttest_cmp expect actual\n>  '\n\nI will test this later, and also try to wrap my head around the details of\nthe problem.\n\nThank you so much!\nJohannes\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"246270","messageId":"53C82F78.1020805@gmail.com","threadId":"37099","inReplyTo":"xmqqbnsnq14j.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH 1/6] MinGW: Skip test redirecting to fd 4","fromName":"Karsten Blees","fromEmail":"karsten.blees@gmail.com","sentAt":"2014-07-17T20:18:00Z","receivedAt":"2014-07-17T20:18:00Z","isPatch":true,"sender":{"key":"karsten.blees@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1111200?v=4"},"body":"Am 17.07.2014 20:41, schrieb Junio C Hamano:\n> Stepan Kasal <kasal@ucw.cz> writes:\n> \n>> From: Johannes Schindelin <johannes.schindelin@gmx.de>\n>>\n>> ... because that does not work in MinGW.\n>>\n>> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n>> Signed-off-by: Stepan Kasal <kasal@ucw.cz>\n>> ---\n>>  t/t0081-line-buffer.sh | 2 +-\n>>  1 file changed, 1 insertion(+), 1 deletion(-)\n>>\n>> diff --git a/t/t0081-line-buffer.sh b/t/t0081-line-buffer.sh\n>> index bd83ed3..25dba00 100755\n>> --- a/t/t0081-line-buffer.sh\n>> +++ b/t/t0081-line-buffer.sh\n>> @@ -29,7 +29,7 @@ test_expect_success '0-length read, send along greeting' '\n>>  \ttest_cmp expect actual\n>>  '\n>>  \n>> -test_expect_success 'read from file descriptor' '\n>> +test_expect_success NOT_MINGW 'read from file descriptor' '\n>>  \trm -f input &&\n>>  \techo hello >expect &&\n>>  \techo hello >input &&\n> \n> Hmm, the point of this test seems to be to exercise buffer_fdinit(),\n> instead of buffer_init(), and the file descriptor does not have to\n> be \"4\" for the purpose of the test, no?\n> \n> Is what is broken on MinGW redirecting arbitrary file descrptors?\n\nYes. 0, 1 and 2 work (vie GetStdHandle), but anything else is handled\nby the C-runtime. And as MSYS.dll (bash) and MSVCRT.dll (git) do it in\ndifferent ways, it doesn't work.\n\n> -\techo copy 6 |\n> -\ttest-line-buffer \"&4\" 4<input >actual &&\n> +\ttest-line-buffer \"&0\" <input >actual &&\n\ntest-line-buffer already reads commands (\"copy 6\") from stdin, so stdin cannot\nbe reused for the data stream, unfortunately.\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"246271","messageId":"xmqqy4vroh54.fsf@gitster.dls.corp.google.com","threadId":"37099","inReplyTo":"53C82F78.1020805@gmail.com","subject":"Re: [PATCH 1/6] MinGW: Skip test redirecting to fd 4","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-07-17T20:38:15Z","receivedAt":"2014-07-17T20:38:15Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Karsten Blees <karsten.blees@gmail.com> writes:\n\n> Yes. 0, 1 and 2 work (vie GetStdHandle), but anything else is handled\n> by the C-runtime. And as MSYS.dll (bash) and MSVCRT.dll (git) do it in\n> different ways, it doesn't work.\n>\n>> -\techo copy 6 |\n>> -\ttest-line-buffer \"&4\" 4<input >actual &&\n>> +\ttest-line-buffer \"&0\" <input >actual &&\n>\n> test-line-buffer already reads commands (\"copy 6\") from stdin, so stdin cannot\n> be reused for the data stream, unfortunately.\n\nSorry, that was my silly.\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"246272","messageId":"xmqqtx6fogy3.fsf@gitster.dls.corp.google.com","threadId":"37099","inReplyTo":"1405611425-10009-6-git-send-email-kasal@ucw.cz","subject":"Re: [PATCH 5/6] t9902: mingw-specific fix for gitfile link files","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-07-17T20:42:28Z","receivedAt":"2014-07-17T20:42:28Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Stepan Kasal <kasal@ucw.cz> writes:\n\n> From: Pat Thoyts <patthoyts@users.sourceforge.net>\n>\n> The path in a .git platform independent link file needs to be absolute\n> and under mingw we need it to be a windows type path, not a unix style\n> path so it should start with a drive letter and not a /.\n\nOK.   We seem to have uses of \"pwd -P\" in other tests; don't they\nneed a similar treatment, and if not why not?\n\n>\n> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>\n> Signed-off-by: Stepan Kasal <kasal@ucw.cz>\n> ---\n>  t/t9902-completion.sh | 17 +++++++++++++----\n>  1 file changed, 13 insertions(+), 4 deletions(-)\n>\n> diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh\n> index 1d1c106..f10a752 100755\n> --- a/t/t9902-completion.sh\n> +++ b/t/t9902-completion.sh\n> @@ -212,9 +212,18 @@ test_expect_success '__gitdir - non-existing $GIT_DIR' '\n>  \t)\n>  '\n>  \n> +function pwd_P_W () {\n> +\tif test_have_prereq MINGW\n> +\tthen\n> +\t\tpwd -W\n> +\telse\n> +\t\tpwd -P\n> +\tfi\n> +}\n> +\n>  test_expect_success '__gitdir - gitfile in cwd' '\n> -\techo \"$(pwd -P)/otherrepo/.git\" >expected &&\n> -\techo \"gitdir: $TRASH_DIRECTORY/otherrepo/.git\" >subdir/.git &&\n> +\techo \"$(pwd_P_W)/otherrepo/.git\" >expected &&\n> +\techo \"gitdir: $(pwd_P_W)/otherrepo/.git\" >subdir/.git &&\n>  \ttest_when_finished \"rm -f subdir/.git\" &&\n>  \t(\n>  \t\tcd subdir &&\n> @@ -224,8 +233,8 @@ test_expect_success '__gitdir - gitfile in cwd' '\n>  '\n>  \n>  test_expect_success '__gitdir - gitfile in parent' '\n> -\techo \"$(pwd -P)/otherrepo/.git\" >expected &&\n> -\techo \"gitdir: $TRASH_DIRECTORY/otherrepo/.git\" >subdir/.git &&\n> +\techo \"$(pwd_P_W)/otherrepo/.git\" >expected &&\n> +\techo \"gitdir: $(pwd_P_W)/otherrepo/.git\" >subdir/.git &&\n>  \ttest_when_finished \"rm -f subdir/.git\" &&\n>  \t(\n>  \t\tcd subdir/subsubdir &&\n> -- \n> 2.0.0.9635.g0be03cb\n>\n> -- \n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"246298","messageId":"CABPQNSaiogqGryK8YOzQXs_z_syvXMBqvOpvGfMNdbLkNzRq_w@mail.gmail.com","threadId":"37099","inReplyTo":"1405611425-10009-5-git-send-email-kasal@ucw.cz","subject":"Re: [PATCH 4/6] t4210: skip command-line encoding tests on mingw","fromName":"Erik Faye-Lund","fromEmail":"kusmabite@gmail.com","sentAt":"2014-07-18T09:52:39Z","receivedAt":"2014-07-18T09:52:39Z","isPatch":true,"sender":{"key":"kusmabite@gmail.com","avatar":"https://avatars.githubusercontent.com/u/47073?v=4"},"body":"On Thu, Jul 17, 2014 at 5:37 PM, Stepan Kasal <kasal@ucw.cz> wrote:\n> From: Pat Thoyts <patthoyts@users.sourceforge.net>\n>\n> On Windows the application command line is provided as unicode and in\n> mingw-git we convert that to utf-8. So these tests that require a iso-8859-1\n> input are being subverted by the encoding transformations we perform and\n> should be skipped.\n>\n> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>\n> Signed-off-by: Stepan Kasal <kasal@ucw.cz>\n> ---\n>  t/t4210-log-i18n.sh | 4 ++--\n>  1 file changed, 2 insertions(+), 2 deletions(-)\n>\n> diff --git a/t/t4210-log-i18n.sh b/t/t4210-log-i18n.sh\n> index 52a7472..9110404 100755\n> --- a/t/t4210-log-i18n.sh\n> +++ b/t/t4210-log-i18n.sh\n> @@ -34,7 +34,7 @@ test_expect_success 'log --grep searches in log output encoding (utf8)' '\n>         test_cmp expect actual\n>  '\n>\n> -test_expect_success 'log --grep searches in log output encoding (latin1)' '\n> +test_expect_success NOT_MINGW 'log --grep searches in log output encoding (latin1)' '\n>         cat >expect <<-\\EOF &&\n>         latin1\n>         utf8\n> @@ -43,7 +43,7 @@ test_expect_success 'log --grep searches in log output encoding (latin1)' '\n>         test_cmp expect actual\n>  '\n>\n> -test_expect_success 'log --grep does not find non-reencoded values (utf8)' '\n> +test_expect_success NOT_MINGW 'log --grep does not find non-reencoded values (utf8)' '\n\nPerhaps these checks would be more readable a few years in the future,\nif we make a separate capability along the lines of\nNON_UNICODE_LOCALE?\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"246326","messageId":"xmqqd2d2mskv.fsf@gitster.dls.corp.google.com","threadId":"37099","inReplyTo":"53C813D2.8070701@gmail.com","subject":"Re: [PATCH 2/6] Disable t0110's high-bit test on Windows","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-07-18T18:26:24Z","receivedAt":"2014-07-18T18:26:24Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Karsten Blees <karsten.blees@gmail.com> writes:\n\n> Am 17.07.2014 17:37, schrieb Stepan Kasal:\n>> From: Johannes Schindelin <johannes.schindelin@gmx.de>\n>> \n>> The bash Git for Windows uses (i.e. the MSys bash) cannot pass\n>> command-line arguments with high bits set verbatim to non-MSys programs,\n>> but instead converts those characters with high bits set to their hex\n>> representation.\n>> \n>\n> The description is not entirely correct...the Unicode-enabled MSYS.dll\n> expects the command line to be UTF-8. Only *invalid* UTF-8 is converted\n> to hex code for convenience. So its not the high bits that cause trouble,\n> but specifying 0x80 without proper UTF-8 lead byte.\n>\n> I believe the last line of the test may actually work:\n>\n> test \"$(test-urlmatch-normalization -p \"$(cat \"$tu-11\")\")\" = \"x://q/%C2%80%DF%BF%E0%A0%80%EF%BF%BD%F0%90%80%80%F0%AF%BF%BD\"\n>\n> -- \n\nCan somebody send a tested replacement then?\n\nThanks.\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"246396","messageId":"53CAC8EF.6020707@gmail.com","threadId":"37099","inReplyTo":"xmqqd2d2mskv.fsf@gitster.dls.corp.google.com","subject":"[PATCH] t0110/MinGW: skip tests that pass arbitrary bytes on the command line","fromName":"Karsten Blees","fromEmail":"karsten.blees@gmail.com","sentAt":"2014-07-19T19:37:19Z","receivedAt":"2014-07-19T19:37:19Z","isPatch":true,"sender":{"key":"karsten.blees@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1111200?v=4"},"body":"On Windows, the command line is a Unicode string, it is not possible to\npass arbitrary bytes to a program. Disable tests that try to do so.\n\nSigned-off-by: Karsten Blees <blees@dcon.de>\n---\n t/t0110-urlmatch-normalization.sh | 7 +++++--\n 1 file changed, 5 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t0110-urlmatch-normalization.sh b/t/t0110-urlmatch-normalization.sh\nindex 8d6096d..410d576 100755\n--- a/t/t0110-urlmatch-normalization.sh\n+++ b/t/t0110-urlmatch-normalization.sh\n@@ -117,7 +117,7 @@ test_expect_success 'url general escapes' '\n \ttest \"$(test-urlmatch-normalization -p \"X://W?'\\!'\")\" = \"x://w/?'\\!'\"\n '\n \n-test_expect_success 'url high-bit escapes' '\n+test_expect_success !MINGW 'url high-bit escapes' '\n \ttest \"$(test-urlmatch-normalization -p \"$(cat \"$tu-1\")\")\" = \"x://q/%01%02%03%04%05%06%07%08%0E%0F%10%11%12\" &&\n \ttest \"$(test-urlmatch-normalization -p \"$(cat \"$tu-2\")\")\" = \"x://q/%13%14%15%16%17%18%19%1B%1C%1D%1E%1F%7F\" &&\n \ttest \"$(test-urlmatch-normalization -p \"$(cat \"$tu-3\")\")\" = \"x://q/%80%81%82%83%84%85%86%87%88%89%8A%8B%8C%8D%8E%8F\" &&\n@@ -127,7 +127,10 @@ test_expect_success 'url high-bit escapes' '\n \ttest \"$(test-urlmatch-normalization -p \"$(cat \"$tu-7\")\")\" = \"x://q/%C0%C1%C2%C3%C4%C5%C6%C7%C8%C9%CA%CB%CC%CD%CE%CF\" &&\n \ttest \"$(test-urlmatch-normalization -p \"$(cat \"$tu-8\")\")\" = \"x://q/%D0%D1%D2%D3%D4%D5%D6%D7%D8%D9%DA%DB%DC%DD%DE%DF\" &&\n \ttest \"$(test-urlmatch-normalization -p \"$(cat \"$tu-9\")\")\" = \"x://q/%E0%E1%E2%E3%E4%E5%E6%E7%E8%E9%EA%EB%EC%ED%EE%EF\" &&\n-\ttest \"$(test-urlmatch-normalization -p \"$(cat \"$tu-10\")\")\" = \"x://q/%F0%F1%F2%F3%F4%F5%F6%F7%F8%F9%FA%FB%FC%FD%FE%FF\" &&\n+\ttest \"$(test-urlmatch-normalization -p \"$(cat \"$tu-10\")\")\" = \"x://q/%F0%F1%F2%F3%F4%F5%F6%F7%F8%F9%FA%FB%FC%FD%FE%FF\"\n+'\n+\n+test_expect_success 'url utf-8 escapes' '\n \ttest \"$(test-urlmatch-normalization -p \"$(cat \"$tu-11\")\")\" = \"x://q/%C2%80%DF%BF%E0%A0%80%EF%BF%BD%F0%90%80%80%F0%AF%BF%BD\"\n '\n \n-- \n2.0.2.906.g50cb2fc.dirty\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"246461","messageId":"xmqqzjg2k6l6.fsf@gitster.dls.corp.google.com","threadId":"37099","inReplyTo":"53CAC8EF.6020707@gmail.com","subject":"Re: [PATCH] t0110/MinGW: skip tests that pass arbitrary bytes on the command line","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-07-21T16:41:09Z","receivedAt":"2014-07-21T16:41:09Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Karsten Blees <karsten.blees@gmail.com> writes:\n\n> On Windows, the command line is a Unicode string, it is not possible to\n> pass arbitrary bytes to a program. Disable tests that try to do so.\n>\n> Signed-off-by: Karsten Blees <blees@dcon.de>\n> ---\n\nThanks; will replace.\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"246462","messageId":"xmqqvbqqk5qu.fsf@gitster.dls.corp.google.com","threadId":"37099","inReplyTo":"CABPQNSaiogqGryK8YOzQXs_z_syvXMBqvOpvGfMNdbLkNzRq_w@mail.gmail.com","subject":"Re: [PATCH 4/6] t4210: skip command-line encoding tests on mingw","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-07-21T16:59:21Z","receivedAt":"2014-07-21T16:59:21Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Erik Faye-Lund <kusmabite@gmail.com> writes:\n\n> On Thu, Jul 17, 2014 at 5:37 PM, Stepan Kasal <kasal@ucw.cz> wrote:\n>> From: Pat Thoyts <patthoyts@users.sourceforge.net>\n>>\n>> On Windows the application command line is provided as unicode and in\n>> mingw-git we convert that to utf-8. So these tests that require a iso-8859-1\n>> input are being subverted by the encoding transformations we perform and\n>> should be skipped.\n>> ...\n>> -test_expect_success 'log --grep searches in log output encoding (latin1)' '\n>> +test_expect_success NOT_MINGW 'log --grep searches in log output encoding (latin1)' '\n>>         cat >expect <<-\\EOF &&\n>>         latin1\n>>         utf8\n>> @@ -43,7 +43,7 @@ test_expect_success 'log --grep searches in log output encoding (latin1)' '\n>>         test_cmp expect actual\n>>  '\n>>\n>> -test_expect_success 'log --grep does not find non-reencoded values (utf8)' '\n>> +test_expect_success NOT_MINGW 'log --grep does not find non-reencoded values (utf8)' '\n>\n> Perhaps these checks would be more readable a few years in the future,\n> if we make a separate capability along the lines of\n> NON_UNICODE_LOCALE?\n\nI do agree that having \"unicode\" and possibly also \"locale\" and\ndropping \"mingw\" from the prerequisite makes sense, especially in\nthe longer term.  Please make it so _after_ the dust settles.\n\nI however suspect that NON_UNICODE_LOCALE does not read quite well;\nisn't the trouble that mingw allows nothing but unicode strings on\nthe command line (there is no trouble for non unicode strings that\nappear as payload)?\n\nOh by the way, can somebody remind me why we spell these as\nNOT_MINGW,  instead of !MINGW?\n\n\n\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"246467","messageId":"alpine.DEB.1.00.1407211944510.3456@s15462909.onlinehome-server.info","threadId":"37099","inReplyTo":"xmqqvbqqk5qu.fsf@gitster.dls.corp.google.com","subject":"Re: Re: [PATCH 4/6] t4210: skip command-line encoding tests on mingw","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2014-07-21T17:45:37Z","receivedAt":"2014-07-21T17:45:37Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Mon, 21 Jul 2014, Junio C Hamano wrote:\n\n> Oh by the way, can somebody remind me why we spell these as\n> NOT_MINGW,  instead of !MINGW?\n\nI guess that is my mistake; when I introduced the use of NOT_MINGW I was\nsimply unaware of the !MINGW syntax.\n\nLet's use the latter consistently?\n\nCiao,\nJohannes\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"246476","messageId":"53CD683B.3080407@kdbg.org","threadId":"37099","inReplyTo":"alpine.DEB.1.00.1407211944510.3456@s15462909.onlinehome-server.info","subject":"Re: Re: [PATCH 4/6] t4210: skip command-line encoding tests on mingw","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2014-07-21T19:21:31Z","receivedAt":"2014-07-21T19:21:31Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 21.07.2014 19:45, schrieb Johannes Schindelin:\n> Hi Junio,\n> \n> On Mon, 21 Jul 2014, Junio C Hamano wrote:\n> \n>> Oh by the way, can somebody remind me why we spell these as\n>> NOT_MINGW,  instead of !MINGW?\n> \n> I guess that is my mistake; when I introduced the use of NOT_MINGW I was\n> simply unaware of the !MINGW syntax.\n\nYou can hardly be blamed. The first occurrence of NOT_MINGW was added\nmuch earlier than the ability to negate prerequisite tokens.\n\n> Let's use the latter consistently?\n\nOf course!\n\n-- Hannes\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"246477","messageId":"xmqqoawiiigz.fsf@gitster.dls.corp.google.com","threadId":"37099","inReplyTo":"xmqqvbqqk5qu.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH 4/6] t4210: skip command-line encoding tests on mingw","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-07-21T20:07:24Z","receivedAt":"2014-07-21T20:07:24Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Oh by the way, can somebody remind me why we spell these as\n> NOT_MINGW,  instead of !MINGW?\n\nSimple answer seems to be that !ANYTHING appeared only at bdccd3c1\n(test-lib: allow negation of prerequisites, 2012-11-14) but at that\nversion already 5 test files use NOT_MINGW (and a few MINGW) as\nprerequisites.  We can safely replace uses of NOT_MINGW prerequisite\nwith !MINGW, it seems.\n\nSorry for the noise.\n\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"246484","messageId":"xmqq1tteibwa.fsf@gitster.dls.corp.google.com","threadId":"37099","inReplyTo":"xmqqoawiiigz.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH 4/6] t4210: skip command-line encoding tests on mingw","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-07-21T22:29:25Z","receivedAt":"2014-07-21T22:29:25Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Junio C Hamano <gitster@pobox.com> writes:\n>\n>> Oh by the way, can somebody remind me why we spell these as\n>> NOT_MINGW,  instead of !MINGW?\n>\n> Simple answer seems to be that !ANYTHING appeared only at bdccd3c1\n> (test-lib: allow negation of prerequisites, 2012-11-14) but at that\n> version already 5 test files use NOT_MINGW (and a few MINGW) as\n> prerequisites.  We can safely replace uses of NOT_MINGW prerequisite\n> with !MINGW, it seems.\n>\n> Sorry for the noise.\n\nSo here is the first of the two small/trivial patch series. \n\nTo prepare the first one, I did \"git grep -e '\\<NOT_' t/\" to the\nresult of applying Stepan's series and edited the hits manually.\nAnd then compared the result with running\n\n $ perl -p -i -e 'if (!/\\btest_set_prereq\\s/) {\n       s/\\bNOT_([A-Z]*)\\b/!$1/g\n   }' t/t*.sh\n\non Stepan's series to see if I missed anything.\n\nThe second one was discovered while doing the manual fix mentioned\nabove.\n\n-- >8 --\nSubject: [PATCH 1/2] test prerequisites: eradicate NOT_FOO\n\nSupport for Back when bdccd3c1 (test-lib: allow negation of\nprerequisites, 2012-11-14) introduced negated predicates\n(e.g. \"!MINGW,!CYGWIN\"), we already had 5 test files that use\nNOT_MINGW (and a few MINGW) as prerequisites.\n\nLet's not add NOT_FOO and rewrite existing ones as !FOO for both\nMINGW and CYGWIN.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n t/t0008-ignores.sh            |  2 +-\n t/t0081-line-buffer.sh        |  2 +-\n t/t1020-subdirectory.sh       |  2 +-\n t/t1300-repo-config.sh        |  6 +++---\n t/t1402-check-ref-format.sh   | 32 ++++++++++++++++----------------\n t/t3901-i18n-patch.sh         | 10 +++++-----\n t/t4201-shortlog.sh           |  6 +++---\n t/t4210-log-i18n.sh           |  4 ++--\n t/t5601-clone.sh              |  4 ++--\n t/t8005-blame-i18n.sh         |  8 ++++----\n t/t9300-fast-import.sh        |  8 ++++----\n t/t9809-git-p4-client-view.sh |  4 ++--\n t/t9812-git-p4-wildcards.sh   | 14 +++++++-------\n t/t9815-git-p4-submit-fail.sh |  2 +-\n t/test-lib.sh                 |  4 ----\n 15 files changed, 52 insertions(+), 56 deletions(-)\n\ndiff --git a/t/t0008-ignores.sh b/t/t0008-ignores.sh\nindex 39e55a1..8dc6939 100755\n--- a/t/t0008-ignores.sh\n+++ b/t/t0008-ignores.sh\n@@ -806,7 +806,7 @@ test_expect_success !MINGW 'quoting allows trailing whitespace' '\n \ttest_cmp err.expect err\n '\n \n-test_expect_success NOT_MINGW,NOT_CYGWIN 'correct handling of backslashes' '\n+test_expect_success !MINGW,!CYGWIN 'correct handling of backslashes' '\n \trm -rf whitespace &&\n \tmkdir whitespace &&\n \t>\"whitespace/trailing 1  \" &&\ndiff --git a/t/t0081-line-buffer.sh b/t/t0081-line-buffer.sh\nindex 25dba00..ce92e6a 100755\n--- a/t/t0081-line-buffer.sh\n+++ b/t/t0081-line-buffer.sh\n@@ -29,7 +29,7 @@ test_expect_success '0-length read, send along greeting' '\n \ttest_cmp expect actual\n '\n \n-test_expect_success NOT_MINGW 'read from file descriptor' '\n+test_expect_success !MINGW 'read from file descriptor' '\n \trm -f input &&\n \techo hello >expect &&\n \techo hello >input &&\ndiff --git a/t/t1020-subdirectory.sh b/t/t1020-subdirectory.sh\nindex 62c0d25..2edb4f2 100755\n--- a/t/t1020-subdirectory.sh\n+++ b/t/t1020-subdirectory.sh\n@@ -118,7 +118,7 @@ test_expect_success 'alias expansion' '\n \t)\n '\n \n-test_expect_success NOT_MINGW '!alias expansion' '\n+test_expect_success !MINGW '!alias expansion' '\n \tpwd >expect &&\n \t(\n \t\tgit config alias.test-alias-directory !pwd &&\ndiff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh\nindex 3f80ff0..fb871d0 100755\n--- a/t/t1300-repo-config.sh\n+++ b/t/t1300-repo-config.sh\n@@ -824,14 +824,14 @@ cat >expect <<\\EOF\n \ttrailingtilde = foo~\n EOF\n \n-test_expect_success NOT_MINGW 'set --path' '\n+test_expect_success !MINGW 'set --path' '\n \trm -f .git/config &&\n \tgit config --path path.home \"~/\" &&\n \tgit config --path path.normal \"/dev/null\" &&\n \tgit config --path path.trailingtilde \"foo~\" &&\n \ttest_cmp expect .git/config'\n \n-if test_have_prereq NOT_MINGW && test \"${HOME+set}\"\n+if test_have_prereq !MINGW && test \"${HOME+set}\"\n then\n \ttest_set_prereq HOMEVAR\n fi\n@@ -854,7 +854,7 @@ cat >expect <<\\EOF\n foo~\n EOF\n \n-test_expect_success NOT_MINGW 'get --path copes with unset $HOME' '\n+test_expect_success !MINGW 'get --path copes with unset $HOME' '\n \t(\n \t\tunset HOME;\n \t\ttest_must_fail git config --get --path path.home \\\ndiff --git a/t/t1402-check-ref-format.sh b/t/t1402-check-ref-format.sh\nindex 9aeb352..72fd917 100755\n--- a/t/t1402-check-ref-format.sh\n+++ b/t/t1402-check-ref-format.sh\n@@ -30,17 +30,17 @@ invalid_ref() {\n }\n \n invalid_ref ''\n-invalid_ref NOT_MINGW '/'\n-invalid_ref NOT_MINGW '/' --allow-onelevel\n-invalid_ref NOT_MINGW '/' --normalize\n-invalid_ref NOT_MINGW '/' '--allow-onelevel --normalize'\n+invalid_ref !MINGW '/'\n+invalid_ref !MINGW '/' --allow-onelevel\n+invalid_ref !MINGW '/' --normalize\n+invalid_ref !MINGW '/' '--allow-onelevel --normalize'\n valid_ref 'foo/bar/baz'\n valid_ref 'foo/bar/baz' --normalize\n invalid_ref 'refs///heads/foo'\n valid_ref 'refs///heads/foo' --normalize\n invalid_ref 'heads/foo/'\n-invalid_ref NOT_MINGW '/heads/foo'\n-valid_ref NOT_MINGW '/heads/foo' --normalize\n+invalid_ref !MINGW '/heads/foo'\n+valid_ref !MINGW '/heads/foo' --normalize\n invalid_ref '///heads/foo'\n valid_ref '///heads/foo' --normalize\n invalid_ref './foo'\n@@ -120,14 +120,14 @@ invalid_ref \"$ref\" --refspec-pattern\n invalid_ref \"$ref\" '--refspec-pattern --allow-onelevel'\n \n ref='/foo'\n-invalid_ref NOT_MINGW \"$ref\"\n-invalid_ref NOT_MINGW \"$ref\" --allow-onelevel\n-invalid_ref NOT_MINGW \"$ref\" --refspec-pattern\n-invalid_ref NOT_MINGW \"$ref\" '--refspec-pattern --allow-onelevel'\n-invalid_ref NOT_MINGW \"$ref\" --normalize\n-valid_ref NOT_MINGW \"$ref\" '--allow-onelevel --normalize'\n-invalid_ref NOT_MINGW \"$ref\" '--refspec-pattern --normalize'\n-valid_ref NOT_MINGW \"$ref\" '--refspec-pattern --allow-onelevel --normalize'\n+invalid_ref !MINGW \"$ref\"\n+invalid_ref !MINGW \"$ref\" --allow-onelevel\n+invalid_ref !MINGW \"$ref\" --refspec-pattern\n+invalid_ref !MINGW \"$ref\" '--refspec-pattern --allow-onelevel'\n+invalid_ref !MINGW \"$ref\" --normalize\n+valid_ref !MINGW \"$ref\" '--allow-onelevel --normalize'\n+invalid_ref !MINGW \"$ref\" '--refspec-pattern --normalize'\n+valid_ref !MINGW \"$ref\" '--refspec-pattern --allow-onelevel --normalize'\n \n \n valid_ref 'refs/heads/a-very-long-refname'\n@@ -199,10 +199,10 @@ invalid_ref_normalized() {\n \n valid_ref_normalized 'heads/foo' 'heads/foo'\n valid_ref_normalized 'refs///heads/foo' 'refs/heads/foo'\n-valid_ref_normalized NOT_MINGW '/heads/foo' 'heads/foo'\n+valid_ref_normalized !MINGW '/heads/foo' 'heads/foo'\n valid_ref_normalized '///heads/foo' 'heads/foo'\n invalid_ref_normalized 'foo'\n-invalid_ref_normalized NOT_MINGW '/foo'\n+invalid_ref_normalized !MINGW '/foo'\n invalid_ref_normalized 'heads/foo/../bar'\n invalid_ref_normalized 'heads/./foo'\n invalid_ref_normalized 'heads\\foo'\ndiff --git a/t/t3901-i18n-patch.sh b/t/t3901-i18n-patch.sh\nindex 55c8a2f..a392f3d 100755\n--- a/t/t3901-i18n-patch.sh\n+++ b/t/t3901-i18n-patch.sh\n@@ -54,7 +54,7 @@ test_expect_success setup '\n \tgit add yours &&\n \tgit commit -s -m \"Second on side\" &&\n \n-\tif test_have_prereq NOT_MINGW\n+\tif test_have_prereq !MINGW\n \tthen\n \t\t# the second one on the side branch is ISO-8859-1\n \t\tgit config i18n.commitencoding ISO8859-1 &&\n@@ -122,7 +122,7 @@ test_expect_success 'rebase (U/L)' '\n \tcheck_encoding 2\n '\n \n-test_expect_success NOT_MINGW 'rebase (L/L)' '\n+test_expect_success !MINGW 'rebase (L/L)' '\n \t# In this test we want ISO-8859-1 encoded commits as the result\n \tgit config i18n.commitencoding ISO8859-1 &&\n \tgit config i18n.logoutputencoding ISO8859-1 &&\n@@ -134,7 +134,7 @@ test_expect_success NOT_MINGW 'rebase (L/L)' '\n \tcheck_encoding 2 8859\n '\n \n-test_expect_success NOT_MINGW 'rebase (L/U)' '\n+test_expect_success !MINGW 'rebase (L/U)' '\n \t# This is pathological -- use UTF-8 as intermediate form\n \t# to get ISO-8859-1 results.\n \tgit config i18n.commitencoding ISO8859-1 &&\n@@ -162,7 +162,7 @@ test_expect_success 'cherry-pick(U/U)' '\n \tcheck_encoding 3\n '\n \n-test_expect_success NOT_MINGW 'cherry-pick(L/L)' '\n+test_expect_success !MINGW 'cherry-pick(L/L)' '\n \t# Both the commitencoding and logoutputencoding is set to ISO-8859-1\n \n \tgit config i18n.commitencoding ISO8859-1 &&\n@@ -192,7 +192,7 @@ test_expect_success 'cherry-pick(U/L)' '\n \tcheck_encoding 3\n '\n \n-test_expect_success NOT_MINGW 'cherry-pick(L/U)' '\n+test_expect_success !MINGW 'cherry-pick(L/U)' '\n \t# Again, the commitencoding is set to ISO-8859-1 but\n \t# logoutputencoding is set to UTF-8.\n \ndiff --git a/t/t4201-shortlog.sh b/t/t4201-shortlog.sh\nindex 565c020..7600a3e 100755\n--- a/t/t4201-shortlog.sh\n+++ b/t/t4201-shortlog.sh\n@@ -93,7 +93,7 @@ test_expect_success 'output from user-defined format is re-wrapped' '\n \ttest_cmp expect log.predictable\n '\n \n-test_expect_success NOT_MINGW 'shortlog wrapping' '\n+test_expect_success !MINGW 'shortlog wrapping' '\n \tcat >expect <<\\EOF &&\n A U Thor (5):\n       Test\n@@ -114,7 +114,7 @@ EOF\n \ttest_cmp expect out\n '\n \n-test_expect_success NOT_MINGW 'shortlog from non-git directory' '\n+test_expect_success !MINGW 'shortlog from non-git directory' '\n \tgit log HEAD >log &&\n \tGIT_DIR=non-existing git shortlog -w <log >out &&\n \ttest_cmp expect out\n@@ -159,7 +159,7 @@ $DSCHO (2):\n \n EOF\n \n-test_expect_success NOT_MINGW 'shortlog encoding' '\n+test_expect_success !MINGW 'shortlog encoding' '\n \tgit reset --hard \"$commit\" &&\n \tgit config --unset i18n.commitencoding &&\n \techo 2 > a1 &&\ndiff --git a/t/t4210-log-i18n.sh b/t/t4210-log-i18n.sh\nindex 9110404..e585fe6 100755\n--- a/t/t4210-log-i18n.sh\n+++ b/t/t4210-log-i18n.sh\n@@ -34,7 +34,7 @@ test_expect_success 'log --grep searches in log output encoding (utf8)' '\n \ttest_cmp expect actual\n '\n \n-test_expect_success NOT_MINGW 'log --grep searches in log output encoding (latin1)' '\n+test_expect_success !MINGW 'log --grep searches in log output encoding (latin1)' '\n \tcat >expect <<-\\EOF &&\n \tlatin1\n \tutf8\n@@ -43,7 +43,7 @@ test_expect_success NOT_MINGW 'log --grep searches in log output encoding (latin\n \ttest_cmp expect actual\n '\n \n-test_expect_success NOT_MINGW 'log --grep does not find non-reencoded values (utf8)' '\n+test_expect_success !MINGW 'log --grep does not find non-reencoded values (utf8)' '\n \t>expect &&\n \tgit log --encoding=utf8 --format=%s --grep=$latin1_e >actual &&\n \ttest_cmp expect actual\ndiff --git a/t/t5601-clone.sh b/t/t5601-clone.sh\nindex 5e67035..e4f10c0 100755\n--- a/t/t5601-clone.sh\n+++ b/t/t5601-clone.sh\n@@ -318,7 +318,7 @@ test_expect_success 'clone myhost:src uses ssh' '\n \texpect_ssh myhost src\n '\n \n-test_expect_success NOT_MINGW,NOT_CYGWIN 'clone local path foo:bar' '\n+test_expect_success !MINGW,!CYGWIN 'clone local path foo:bar' '\n \tcp -R src \"foo:bar\" &&\n \tgit clone \"foo:bar\" foobar &&\n \texpect_ssh none\n@@ -339,7 +339,7 @@ test_clone_url () {\n \texpect_ssh \"$2\" \"$3\"\n }\n \n-test_expect_success NOT_MINGW 'clone c:temp is ssl' '\n+test_expect_success !MINGW 'clone c:temp is ssl' '\n \ttest_clone_url c:temp c temp\n '\n \ndiff --git a/t/t8005-blame-i18n.sh b/t/t8005-blame-i18n.sh\nindex a6e73d0..847d098 100755\n--- a/t/t8005-blame-i18n.sh\n+++ b/t/t8005-blame-i18n.sh\n@@ -33,7 +33,7 @@ author $SJIS_NAME\n summary $SJIS_MSG\n EOF\n \n-test_expect_success NOT_MINGW \\\n+test_expect_success !MINGW \\\n \t'blame respects i18n.commitencoding' '\n \tgit blame --incremental file | \\\n \t\tegrep \"^(author|summary) \" > actual &&\n@@ -49,7 +49,7 @@ author $EUC_JAPAN_NAME\n summary $EUC_JAPAN_MSG\n EOF\n \n-test_expect_success NOT_MINGW \\\n+test_expect_success !MINGW \\\n \t'blame respects i18n.logoutputencoding' '\n \tgit config i18n.logoutputencoding eucJP &&\n \tgit blame --incremental file | \\\n@@ -66,7 +66,7 @@ author $UTF8_NAME\n summary $UTF8_MSG\n EOF\n \n-test_expect_success NOT_MINGW \\\n+test_expect_success !MINGW \\\n \t'blame respects --encoding=UTF-8' '\n \tgit blame --incremental --encoding=UTF-8 file | \\\n \t\tegrep \"^(author|summary) \" > actual &&\n@@ -82,7 +82,7 @@ author $UTF8_NAME\n summary $UTF8_MSG\n EOF\n \n-test_expect_success NOT_MINGW \\\n+test_expect_success !MINGW \\\n \t'blame respects --encoding=none' '\n \tgit blame --incremental --encoding=none file | \\\n \t\tegrep \"^(author|summary) \" > actual &&\ndiff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh\nindex 5fc9ef2..99f5161 100755\n--- a/t/t9300-fast-import.sh\n+++ b/t/t9300-fast-import.sh\n@@ -2336,7 +2336,7 @@ test_expect_success 'R: cat-blob-fd must be a nonnegative integer' '\n \ttest_must_fail git fast-import --cat-blob-fd=-1 </dev/null\n '\n \n-test_expect_success NOT_MINGW 'R: print old blob' '\n+test_expect_success !MINGW 'R: print old blob' '\n \tblob=$(echo \"yes it can\" | git hash-object -w --stdin) &&\n \tcat >expect <<-EOF &&\n \t${blob} blob 11\n@@ -2348,7 +2348,7 @@ test_expect_success NOT_MINGW 'R: print old blob' '\n \ttest_cmp expect actual\n '\n \n-test_expect_success NOT_MINGW 'R: in-stream cat-blob-fd not respected' '\n+test_expect_success !MINGW 'R: in-stream cat-blob-fd not respected' '\n \techo hello >greeting &&\n \tblob=$(git hash-object -w greeting) &&\n \tcat >expect <<-EOF &&\n@@ -2369,7 +2369,7 @@ test_expect_success NOT_MINGW 'R: in-stream cat-blob-fd not respected' '\n \ttest_cmp expect actual.1\n '\n \n-test_expect_success NOT_MINGW 'R: print new blob' '\n+test_expect_success !MINGW 'R: print new blob' '\n \tblob=$(echo \"yep yep yep\" | git hash-object --stdin) &&\n \tcat >expect <<-EOF &&\n \t${blob} blob 12\n@@ -2387,7 +2387,7 @@ test_expect_success NOT_MINGW 'R: print new blob' '\n \ttest_cmp expect actual\n '\n \n-test_expect_success NOT_MINGW 'R: print new blob by sha1' '\n+test_expect_success !MINGW 'R: print new blob by sha1' '\n \tblob=$(echo \"a new blob named by sha1\" | git hash-object --stdin) &&\n \tcat >expect <<-EOF &&\n \t${blob} blob 25\ndiff --git a/t/t9809-git-p4-client-view.sh b/t/t9809-git-p4-client-view.sh\nindex 23a827f..e80db7a 100755\n--- a/t/t9809-git-p4-client-view.sh\n+++ b/t/t9809-git-p4-client-view.sh\n@@ -365,7 +365,7 @@ test_expect_success 'wildcard files submit back to p4, client-spec case' '\n \t(\n \t\tcd \"$git\" &&\n \t\techo git-wild-hash >dir1/git-wild#hash &&\n-\t\tif test_have_prereq NOT_MINGW NOT_CYGWIN\n+\t\tif test_have_prereq !MINGW !CYGWIN\n \t\tthen\n \t\t\techo git-wild-star >dir1/git-wild\\*star\n \t\tfi &&\n@@ -379,7 +379,7 @@ test_expect_success 'wildcard files submit back to p4, client-spec case' '\n \t(\n \t\tcd \"$cli\" &&\n \t\ttest_path_is_file dir1/git-wild#hash &&\n-\t\tif test_have_prereq NOT_MINGW NOT_CYGWIN\n+\t\tif test_have_prereq !MINGW !CYGWIN\n \t\tthen\n \t\t\ttest_path_is_file dir1/git-wild\\*star\n \t\tfi &&\ndiff --git a/t/t9812-git-p4-wildcards.sh b/t/t9812-git-p4-wildcards.sh\nindex c7472cb..ed4b488 100755\n--- a/t/t9812-git-p4-wildcards.sh\n+++ b/t/t9812-git-p4-wildcards.sh\n@@ -14,7 +14,7 @@ test_expect_success 'add p4 files with wildcards in the names' '\n \t\tprintf \"file2\\nhas\\nsome\\nrandom\\ntext\\n\" >file2 &&\n \t\tp4 add file2 &&\n \t\techo file-wild-hash >file-wild#hash &&\n-\t\tif test_have_prereq NOT_MINGW NOT_CYGWIN\n+\t\tif test_have_prereq !MINGW !CYGWIN\n \t\tthen\n \t\t\techo file-wild-star >file-wild\\*star\n \t\tfi &&\n@@ -31,7 +31,7 @@ test_expect_success 'wildcard files git p4 clone' '\n \t(\n \t\tcd \"$git\" &&\n \t\ttest -f file-wild#hash &&\n-\t\tif test_have_prereq NOT_MINGW NOT_CYGWIN\n+\t\tif test_have_prereq !MINGW !CYGWIN\n \t\tthen\n \t\t\ttest -f file-wild\\*star\n \t\tfi &&\n@@ -46,7 +46,7 @@ test_expect_success 'wildcard files submit back to p4, add' '\n \t(\n \t\tcd \"$git\" &&\n \t\techo git-wild-hash >git-wild#hash &&\n-\t\tif test_have_prereq NOT_MINGW NOT_CYGWIN\n+\t\tif test_have_prereq !MINGW !CYGWIN\n \t\tthen\n \t\t\techo git-wild-star >git-wild\\*star\n \t\tfi &&\n@@ -60,7 +60,7 @@ test_expect_success 'wildcard files submit back to p4, add' '\n \t(\n \t\tcd \"$cli\" &&\n \t\ttest_path_is_file git-wild#hash &&\n-\t\tif test_have_prereq NOT_MINGW NOT_CYGWIN\n+\t\tif test_have_prereq !MINGW !CYGWIN\n \t\tthen\n \t\t\ttest_path_is_file git-wild\\*star\n \t\tfi &&\n@@ -75,7 +75,7 @@ test_expect_success 'wildcard files submit back to p4, modify' '\n \t(\n \t\tcd \"$git\" &&\n \t\techo new-line >>git-wild#hash &&\n-\t\tif test_have_prereq NOT_MINGW NOT_CYGWIN\n+\t\tif test_have_prereq !MINGW !CYGWIN\n \t\tthen\n \t\t\techo new-line >>git-wild\\*star\n \t\tfi &&\n@@ -89,7 +89,7 @@ test_expect_success 'wildcard files submit back to p4, modify' '\n \t(\n \t\tcd \"$cli\" &&\n \t\ttest_line_count = 2 git-wild#hash &&\n-\t\tif test_have_prereq NOT_MINGW NOT_CYGWIN\n+\t\tif test_have_prereq !MINGW !CYGWIN\n \t\tthen\n \t\t\ttest_line_count = 2 git-wild\\*star\n \t\tfi &&\n@@ -152,7 +152,7 @@ test_expect_success 'wildcard files submit back to p4, delete' '\n \t(\n \t\tcd \"$cli\" &&\n \t\ttest_path_is_missing git-wild#hash &&\n-\t\tif test_have_prereq NOT_MINGW NOT_CYGWIN\n+\t\tif test_have_prereq !MINGW !CYGWIN\n \t\tthen\n \t\t\ttest_path_is_missing git-wild\\*star\n \t\tfi &&\ndiff --git a/t/t9815-git-p4-submit-fail.sh b/t/t9815-git-p4-submit-fail.sh\nindex 1243d96..4cff6a7 100755\n--- a/t/t9815-git-p4-submit-fail.sh\n+++ b/t/t9815-git-p4-submit-fail.sh\n@@ -417,7 +417,7 @@ test_expect_success 'cleanup chmod after submit cancel' '\n \t\t! p4 fstat -T action text &&\n \t\ttest_path_is_file text+x &&\n \t\t! p4 fstat -T action text+x &&\n-\t\tif test_have_prereq NOT_CYGWIN\n+\t\tif test_have_prereq !CYGWIN\n \t\tthen\n \t\t\tstat --format=%A text | egrep ^-r-- &&\n \t\t\tstat --format=%A text+x | egrep ^-r-x\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex a479537..b72f6bd 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -866,7 +866,6 @@ case $(uname -s) in\n \t# backslashes in pathspec are converted to '/'\n \t# exec does not inherit the PID\n \ttest_set_prereq MINGW\n-\ttest_set_prereq NOT_CYGWIN\n \ttest_set_prereq SED_STRIPS_CR\n \ttest_set_prereq GREP_STRIPS_CR\n \tGIT_TEST_CMP=mingw_test_cmp\n@@ -874,7 +873,6 @@ case $(uname -s) in\n *CYGWIN*)\n \ttest_set_prereq POSIXPERM\n \ttest_set_prereq EXECKEEPSPID\n-\ttest_set_prereq NOT_MINGW\n \ttest_set_prereq CYGWIN\n \ttest_set_prereq SED_STRIPS_CR\n \ttest_set_prereq GREP_STRIPS_CR\n@@ -883,8 +881,6 @@ case $(uname -s) in\n \ttest_set_prereq POSIXPERM\n \ttest_set_prereq BSLASHPSPEC\n \ttest_set_prereq EXECKEEPSPID\n-\ttest_set_prereq NOT_MINGW\n-\ttest_set_prereq NOT_CYGWIN\n \t;;\n esac\n \n-- \n2.0.2-870-g9e2e527\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"246485","messageId":"xmqqwqb6gxaq.fsf_-_@gitster.dls.corp.google.com","threadId":"37099","inReplyTo":"xmqqoawiiigz.fsf@gitster.dls.corp.google.com","subject":"[PATCH 2/2] test prerequisites: enumerate with commas","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-07-21T22:30:05Z","receivedAt":"2014-07-21T22:30:05Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"test_have_prereq does understand multiple predicates given as\nseparate arguments, but that is by accident.  We should list the\nprerequisites just like we use them as the (first) optional\nparameter for test_expect_success, concatenated with commas, for\nconsistency.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n t/t9809-git-p4-client-view.sh |  4 ++--\n t/t9812-git-p4-wildcards.sh   | 14 +++++++-------\n 2 files changed, 9 insertions(+), 9 deletions(-)\n\ndiff --git a/t/t9809-git-p4-client-view.sh b/t/t9809-git-p4-client-view.sh\nindex e80db7a..897b3c3 100755\n--- a/t/t9809-git-p4-client-view.sh\n+++ b/t/t9809-git-p4-client-view.sh\n@@ -365,7 +365,7 @@ test_expect_success 'wildcard files submit back to p4, client-spec case' '\n \t(\n \t\tcd \"$git\" &&\n \t\techo git-wild-hash >dir1/git-wild#hash &&\n-\t\tif test_have_prereq !MINGW !CYGWIN\n+\t\tif test_have_prereq !MINGW,!CYGWIN\n \t\tthen\n \t\t\techo git-wild-star >dir1/git-wild\\*star\n \t\tfi &&\n@@ -379,7 +379,7 @@ test_expect_success 'wildcard files submit back to p4, client-spec case' '\n \t(\n \t\tcd \"$cli\" &&\n \t\ttest_path_is_file dir1/git-wild#hash &&\n-\t\tif test_have_prereq !MINGW !CYGWIN\n+\t\tif test_have_prereq !MINGW,!CYGWIN\n \t\tthen\n \t\t\ttest_path_is_file dir1/git-wild\\*star\n \t\tfi &&\ndiff --git a/t/t9812-git-p4-wildcards.sh b/t/t9812-git-p4-wildcards.sh\nindex ed4b488..0206771 100755\n--- a/t/t9812-git-p4-wildcards.sh\n+++ b/t/t9812-git-p4-wildcards.sh\n@@ -14,7 +14,7 @@ test_expect_success 'add p4 files with wildcards in the names' '\n \t\tprintf \"file2\\nhas\\nsome\\nrandom\\ntext\\n\" >file2 &&\n \t\tp4 add file2 &&\n \t\techo file-wild-hash >file-wild#hash &&\n-\t\tif test_have_prereq !MINGW !CYGWIN\n+\t\tif test_have_prereq !MINGW,!CYGWIN\n \t\tthen\n \t\t\techo file-wild-star >file-wild\\*star\n \t\tfi &&\n@@ -31,7 +31,7 @@ test_expect_success 'wildcard files git p4 clone' '\n \t(\n \t\tcd \"$git\" &&\n \t\ttest -f file-wild#hash &&\n-\t\tif test_have_prereq !MINGW !CYGWIN\n+\t\tif test_have_prereq !MINGW,!CYGWIN\n \t\tthen\n \t\t\ttest -f file-wild\\*star\n \t\tfi &&\n@@ -46,7 +46,7 @@ test_expect_success 'wildcard files submit back to p4, add' '\n \t(\n \t\tcd \"$git\" &&\n \t\techo git-wild-hash >git-wild#hash &&\n-\t\tif test_have_prereq !MINGW !CYGWIN\n+\t\tif test_have_prereq !MINGW,!CYGWIN\n \t\tthen\n \t\t\techo git-wild-star >git-wild\\*star\n \t\tfi &&\n@@ -60,7 +60,7 @@ test_expect_success 'wildcard files submit back to p4, add' '\n \t(\n \t\tcd \"$cli\" &&\n \t\ttest_path_is_file git-wild#hash &&\n-\t\tif test_have_prereq !MINGW !CYGWIN\n+\t\tif test_have_prereq !MINGW,!CYGWIN\n \t\tthen\n \t\t\ttest_path_is_file git-wild\\*star\n \t\tfi &&\n@@ -75,7 +75,7 @@ test_expect_success 'wildcard files submit back to p4, modify' '\n \t(\n \t\tcd \"$git\" &&\n \t\techo new-line >>git-wild#hash &&\n-\t\tif test_have_prereq !MINGW !CYGWIN\n+\t\tif test_have_prereq !MINGW,!CYGWIN\n \t\tthen\n \t\t\techo new-line >>git-wild\\*star\n \t\tfi &&\n@@ -89,7 +89,7 @@ test_expect_success 'wildcard files submit back to p4, modify' '\n \t(\n \t\tcd \"$cli\" &&\n \t\ttest_line_count = 2 git-wild#hash &&\n-\t\tif test_have_prereq !MINGW !CYGWIN\n+\t\tif test_have_prereq !MINGW,!CYGWIN\n \t\tthen\n \t\t\ttest_line_count = 2 git-wild\\*star\n \t\tfi &&\n@@ -152,7 +152,7 @@ test_expect_success 'wildcard files submit back to p4, delete' '\n \t(\n \t\tcd \"$cli\" &&\n \t\ttest_path_is_missing git-wild#hash &&\n-\t\tif test_have_prereq !MINGW !CYGWIN\n+\t\tif test_have_prereq !MINGW,!CYGWIN\n \t\tthen\n \t\t\ttest_path_is_missing git-wild\\*star\n \t\tfi &&\n-- \n2.0.2-870-g9e2e527\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"246486","messageId":"xmqqsilugwus.fsf@gitster.dls.corp.google.com","threadId":"37099","inReplyTo":"xmqq1tteibwa.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH 4/6] t4210: skip command-line encoding tests on mingw","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-07-21T22:39:39Z","receivedAt":"2014-07-21T22:39:39Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> So here is the first of the two small/trivial patch series. \n>\n> To prepare the first one, I did \"git grep -e '\\<NOT_' t/\" to the\n> result of applying Stepan's series and edited the hits manually.\n> And then compared the result with running\n>\n>  $ perl -p -i -e 'if (!/\\btest_set_prereq\\s/) {\n>        s/\\bNOT_([A-Z]*)\\b/!$1/g\n>    }' t/t*.sh\n>\n> on Stepan's series to see if I missed anything.\n>\n> The second one was discovered while doing the manual fix mentioned\n> above.\n> ...\n>  t/t1402-check-ref-format.sh   | 32 ++++++++++++++++----------------\n>  t/test-lib.sh                 |  4 ----\n>  15 files changed, 52 insertions(+), 56 deletions(-)\n\nUnfortunately, t1402 needs more work X-<.\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"}]}