GitHub PushEvent at 2014-07-01 07:59:55
Repository: git
Actor: mjg
Payload: {"shas":[["1d94c403fd52eddd2c4d6c0123f64c56a79bfca7","955b63282c975ba379c4995cac1c2e1e7dfebe62@dcon.de","Win32 dirent: remove unused dirent.d_ino member\n\nThere are no proper inodes on Windows, so remove dirent.d_ino and #define\nNO_D_INO_IN_DIRENT in the Makefile (this skips e.g. an ineffective qsort in\nfsck.c).\n\nSigned-off-by: Karsten Blees <blees@dcon.de>\nSigned-off-by: Erik Faye-Lund <kusmabite@gmail.com>\nSigned-off-by: Stepan Kasal <kasal@ucw.cz>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","Karsten Blees",false],["b0601e6564061aa21699ee0a523e969c228cb1b4","955b63282c975ba379c4995cac1c2e1e7dfebe62@dcon.de","Win32 dirent: remove unused dirent.d_reclen member\n\nRemove the union around dirent.d_type and the unused dirent.d_reclen member\n(which was necessary for compatibility with the MinGW dirent runtime, which\nis no longer used).\n\nSigned-off-by: Karsten Blees <blees@dcon.de>\nSigned-off-by: Erik Faye-Lund <kusmabite@gmail.com>\nSigned-off-by: Stepan Kasal <kasal@ucw.cz>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","Karsten Blees",false],["fa9abe95bec0e12322baae3511678ccfeb97eebc","955b63282c975ba379c4995cac1c2e1e7dfebe62@dcon.de","Win32 dirent: change FILENAME_MAX to MAX_PATH\n\nFILENAME_MAX and MAX_PATH are both 260 on Windows, however, MAX_PATH is\nused throughout the other Win32 code in Git, and also defines the length\nof file name buffers in the Win32 API (e.g. WIN32_FIND_DATA.cFileName,\nfrom which we're copying the dirent data).\n\nSigned-off-by: Karsten Blees <blees@dcon.de>\nSigned-off-by: Erik Faye-Lund <kusmabite@gmail.com>\nSigned-off-by: Stepan Kasal <kasal@ucw.cz>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","Karsten Blees",false],["a8248f4a8dfc43177bbbcd9b874fc4e0cbf6b322","955b63282c975ba379c4995cac1c2e1e7dfebe62@dcon.de","Win32 dirent: clarify #include directives\n\nGit-compat-util.h is two dirs up, and already includes <dirent.h> (which\nis the same as \"dirent.h\" due to -Icompat/win32 in the Makefile).\n\nSigned-off-by: Karsten Blees <blees@dcon.de>\nSigned-off-by: Erik Faye-Lund <kusmabite@gmail.com>\nSigned-off-by: Stepan Kasal <kasal@ucw.cz>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","Karsten Blees",false],["d8890ce72609b3f7a002ed38b4ed832b6a97fc5c","955b63282c975ba379c4995cac1c2e1e7dfebe62@dcon.de","Win32 dirent: improve dirent implementation\n\nImprove the dirent implementation by removing the relics that were once\nnecessary to plug into the now unused MinGW runtime, in preparation for\nUnicode file name support.\n\nMove FindFirstFile to opendir, and FindClose to closedir, with the\nfollowing implications:\n- DIR.dd_name is no longer needed\n- chdir(one); opendir(relative); chdir(two); readdir() works as expected\n  (i.e. lists one/relative instead of two/relative)\n- DIR.dd_handle is a valid handle for the entire lifetime of the DIR struct\n- thus, all checks for dd_handle == INVALID_HANDLE_VALUE and dd_handle == 0\n  have been removed\n- the special case that the directory has been fully read (which was\n  previously explicitly tracked with dd_handle == INVALID_HANDLE_VALUE &&\n  dd_stat != 0) is now handled implicitly by the FindNextFile error\n  handling code (if a client continues to call readdir after receiving\n  NULL, FindNextFile will continue to fail with ERROR_NO_MORE_FILES, to\n  the same effect)\n- extracting dirent data from WIN32_FIND_DATA is needed in two places, so\n  moved to its own method\n- GetFileAttributes is no longer needed. The same information can be\n  obtained from the FindFirstFile error code, which is ERROR_DIRECTORY if\n  the name is NOT a directory (-> ENOTDIR), otherwise we can use\n  err_win_to_posix (e.g. ERROR_PATH_NOT_FOUND -> ENOENT). The\n  ERROR_DIRECTORY case could be fixed in err_win_to_posix, but this\n  probably breaks other functionality.\n\nRemoves the ERROR_NO_MORE_FILES check after FindFirstFile (this was\nfortunately a NOOP (searching for '*' always finds '.' and '..'),\notherwise the subsequent code would have copied data from an uninitialized\nbuffer).\n\nChanges malloc to git support function xmalloc, so opendir will die() if\nout of memory, rather than failing with ENOMEM and letting git work on\nincomplete directory listings (error handling in dir.c is quite sparse).\n\nSigned-off-by: Karsten Blees <blees@dcon.de>\nSigned-off-by: Erik Faye-Lund <kusmabite@gmail.com>\nSigned-off-by: Stepan Kasal <kasal@ucw.cz>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","Karsten Blees",false],["13f1df432ea78a9dda2e70036215f754db182934","955b63282c975ba379c4995cac1c2e1e7dfebe62@dcon.de","Win32: move main macro to a function\n\nThe code in the MinGW main macro is getting more and more complex, move to\na separate initialization function for readabiliy and extensibility.\n\nSigned-off-by: Karsten Blees <blees@dcon.de>\nSigned-off-by: Erik Faye-Lund <kusmabite@gmail.com>\nSigned-off-by: Stepan Kasal <kasal@ucw.cz>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","Karsten Blees",false],["a15d4af4497d147bfdb672e121b67db335ec1c21","257b363030caa50dbc1cdef9b268d9d56bf639f1@ucw.cz","mingw: avoid const warning\n\nFix const warnings in http-fetch.c and remote-curl.c main() where is\nargv declared as const.\n\nThe fix should work for all future declarations of main, no matter\nwhether the second parameter's type is \"char**\", \"const char**\", or\n\"char *[]\".\n\nSigned-off-by: Stepan Kasal <kasal@ucw.cz>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","Stepan Kasal",false],["617ce965aa3e5d44d0292c9094ee692f161a55d0","955b63282c975ba379c4995cac1c2e1e7dfebe62@dcon.de","Win32: support Unicode console output\n\nWriteConsoleW seems to be the only way to reliably print unicode to the\nconsole (without weird code page conversions).\n\nAlso redirects vfprintf to the winansi.c version.\n\nSigned-off-by: Karsten Blees <blees@dcon.de>\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Stepan Kasal <kasal@ucw.cz>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","Karsten Blees",false],["143e615270bd17dcef0d8e5751dacc496eff687d","955b63282c975ba379c4995cac1c2e1e7dfebe62@dcon.de","Win32: detect console streams more reliably\n\nGetStdHandle(STD_OUTPUT_HANDLE) doesn't work for stderr if stdout is\nredirected. Use _get_osfhandle of the FILE* instead.\n\n_isatty() is true for all character devices (including parallel and serial\nports). Check return value of GetConsoleScreenBufferInfo instead to\nreliably detect console handles (also don't initialize internal state from\nan uninitialized CONSOLE_SCREEN_BUFFER_INFO structure if the function\nfails).\n\nSigned-off-by: Karsten Blees <blees@dcon.de>\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Stepan Kasal <kasal@ucw.cz>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","Karsten Blees",false],["1edeb9abf5828e317999b4ebe8b7472c494341f2","955b63282c975ba379c4995cac1c2e1e7dfebe62@dcon.de","Win32: warn if the console font doesn't support Unicode\n\nUnicode console output won't display correctly with default settings\nbecause the default console font (\"Terminal\") only supports the system's\nOEM charset. Unfortunately, this is a user specific setting, so it cannot\nbe easily fixed by e.g. some registry tricks in the setup program.\n\nThis change prints a warning on exit if console output contained non-ascii\ncharacters and the console font is supposedly not a TrueType font (which\nusually have decent Unicode support).\n\nSigned-off-by: Karsten Blees <blees@dcon.de>\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Stepan Kasal <kasal@ucw.cz>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","Karsten Blees",false],["1c950a594c40db7a946616cbc6cc5f9e25926a20","955b63282c975ba379c4995cac1c2e1e7dfebe62@dcon.de","Win32: add Unicode conversion functions\n\nAdd Unicode conversion functions to convert between Windows native UTF-16LE\nencoding to UTF-8 and back.\n\nTo support repositories with legacy-encoded file names, the UTF-8 to UTF-16\nconversion function tries to create valid, unique file names even for\ninvalid UTF-8 byte sequences, so that these repositories can be checked out\nwithout error.\n\nThe current implementation leaves invalid UTF-8 bytes in range 0xa0 - 0xff\nas is (producing printable Unicode chars \\u00a0 - \\u00ff, equivalent to\nISO-8859-1), and converts 0x80 - 0x9f to hex-code (\\u0080 - \\u009f are\ncontrol chars).\n\nThe Windows MultiByteToWideChar API was not used as it either drops invalid\nUTF-8 sequences (on Win2k/XP; producing non-unique or even empty file\nnames) or converts them to the replacement char \\ufffd (Vista/7; causing\nERROR_INVALID_NAME in subsequent calls to file system APIs).\n\nSigned-off-by: Karsten Blees <blees@dcon.de>\nSigned-off-by: Stepan Kasal <kasal@ucw.cz>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","Karsten Blees",false],["eac14f8909d986a38d9eab4a7f926af41dd64a4f","955b63282c975ba379c4995cac1c2e1e7dfebe62@dcon.de","Win32: Thread-safe windows console output\n\nWinansi.c has many static variables that are accessed and modified from\nthe [v][f]printf / fputs functions overridden in the file. This may cause\nmulti threaded git commands that print to the console to produce corrupted\noutput or even crash.\n\nAdditionally, winansi.c doesn't override all functions that can be used to\nprint to the console (e.g. fwrite, write, fputc are missing), so that ANSI\nescapes don't work properly for some git commands (e.g. git-grep).\n\nInstead of doing ANSI emulation in just a few wrapped functions on top of\nthe IO API, let's plug into the IO system and take advantage of the thread\nsafety inherent to the IO system.\n\nRedirect stdout and stderr to a pipe if they point to the console. A\nbackground thread reads from the pipe, handles ANSI escape sequences and\nUTF-8 to UTF-16 conversion, then writes to the console.\n\nThe pipe-based stdout and stderr replacements must be set to unbuffered, as\nMSVCRT doesn't support line buffering and fully buffered streams are\ninappropriate for console output.\n\nDue to the byte-oriented pipe, ANSI escape sequences and multi-byte UTF-8\nsequences can no longer be expected to arrive in one piece. Replace the\nstring-based ansi_emulate() with a simple stateful parser (this also fixes\ncolored diff hunk headers, which were broken as of commit 2efcc977).\n\nOverride isatty to return true for the pipes redirecting to the console.\n\nExec/spawn obtain the original console handle to pass to the next process\nvia winansi_get_osfhandle().\n\nAll other overrides are gone, the default stdio implementations work as\nexpected with the piped stdout/stderr descriptors.\n\nGlobal variables are either initialized on startup (single threaded) or\nexclusively modified by the background thread. Threads communicate through\nthe pipe, no further synchronization is necessary.\n\nThe background thread is terminated by disonnecting the pipe after flushing\nthe stdio and pipe buffers. This doesn't work for anonymous pipes (created\nvia CreatePipe), as DisconnectNamedPipe only works on the read end, which\ndiscards remaining data. Thus we have to setup the pipe manually, with the\nwrite end beeing the server (opened with CreateNamedPipe) and the read end\nthe client (opened with CreateFile).\n\nLimitations: doesn't track reopened or duped file descriptors, i.e.:\n- fdopen(1/2) returns fully buffered streams\n- dup(1/2), dup2(1/2) returns normal pipe descriptors (i.e. isatty() =\n  false, winansi_get_osfhandle won't return the original console handle)\n\nCurrently, only the git-format-patch command uses xfdopen(xdup(1)) (see\n\"realstdout\" in builtin/log.c), but works well with these limitations.\n\nMany thanks to Atsushi Nakagawa <atnak@chejz.com> for suggesting and\nreviewing the thread-exit-mechanism.\n\nSigned-off-by: Karsten Blees <blees@dcon.de>\nSigned-off-by: Stepan Kasal <kasal@ucw.cz>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","Karsten Blees",false],["fcd428f4a952a19d7553a9447fd4fa3c3584c6e6","955b63282c975ba379c4995cac1c2e1e7dfebe62@dcon.de","Win32: fix broken pipe detection\n\nAs of \"Win32: Thread-safe windows console output\", git-log no longer\nterminates when the pager process dies. This is due to disabling buffering\nfor the replaced stdout / stderr streams. Git-log will periodically fflush\nstdout (see write_or_die.c/mayble_flush_or_die()), but with no buffering,\nthis is a NOP that always succeeds (so we never detect the EPIPE error).\n\nExchange the original console handles with our console thread pipe handles\nby accessing the internal MSVCRT data structures directly (which are\nexposed via __pioinfo for some reason).\n\nImplement this with minimal assumptions about the actual data structure to\nmake it work with different (hopefully even future) MSVCRT versions.\n\nWhile messing with internal data structures is ugly, this patch solves the\nproblem at the source instead of adding more workarounds. We no longer need\nthe special winansi_isatty override, and the limitations documented in\n\"Win32: Thread-safe windows console output\" are gone (i.e. fdopen(1/2)\nreturns unbuffered streams now, and isatty() for duped console file\ndescriptors works as expected).\n\nSigned-off-by: Karsten Blees <blees@dcon.de>\nSigned-off-by: Stepan Kasal <kasal@ucw.cz>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","Karsten Blees",false],["51822653f58e6b9b6119f560ff864813fbde81ba","ec88036760ea878e4620ec6a67196fa6441c3dca@gmail.com","Win32: reliably detect console pipe handles\n\nAs of \"Win32: Thread-safe windows console output\", child processes may\nprint to the console even if stdout has been redirected to a file. E.g.:\n\n git config tar.cat.command \"cat\"\n git archive -o test.cat HEAD\n\nDetecting whether stdout / stderr point to our console pipe is currently\nbased on the assumption that OS HANDLE values are never reused. This is\napparently not true if stdout / stderr is replaced via dup2() (as in\nbuiltin/archive.c:17).\n\nInstead of comparing handle values, check if the file descriptor isatty()\nbacked by a pipe OS handle. This is only possible by swapping the handles\nin MSVCRT's internal data structures, as we do in winansi_init().\n\nReported-by: Johannes Sixt <j6t@kdbg.org>\nSigned-off-by: Karsten Blees <blees@dcon.de>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","Karsten Blees",false],["570f1e6e1a7145efb4e80da9c711fcbc319f6b17","53fb8db7833fca1e1746dd8592f61048d350f64c@gmx.de","Win32: let mingw_execve() return an int\n\nThis is in the great tradition of POSIX. Original fix by Olivier Refalo.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Stepan Kasal <kasal@ucw.cz>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","Johannes Schindelin",false],["3e66e47b1b1baef859be79a12091fdbdd82492a8","955b63282c975ba379c4995cac1c2e1e7dfebe62@dcon.de","Win32: simplify internal mingw_spawn* APIs\n\nThe only public spawn function that needs to tweak the environment is\nmingw_spawnvpe (called from start_command). Nevertheless, all internal\nspawn* functions take an env parameter and needlessly pass the global\nchar **environ around. Remove the env parameter where it's not needed.\n\nThis removes the internal mingw_execve abstraction, which is no longer\nneeded.\n\nSigned-off-by: Karsten Blees <blees@dcon.de>\nSigned-off-by: Stepan Kasal <kasal@ucw.cz>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","Karsten Blees",false],["58aa3d2a69ded1f48a1c9c63176384d02925c9d6","955b63282c975ba379c4995cac1c2e1e7dfebe62@dcon.de","Win32: fix potential multi-threading issue\n\n...by removing a static buffer in do_stat_internal.\n\nSigned-off-by: Karsten Blees <blees@dcon.de>\nSigned-off-by: Erik Faye-Lund <kusmabite@gmail.com>\nSigned-off-by: Stepan Kasal <kasal@ucw.cz>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","Karsten Blees",false],["5901dc6613fcb5e4a4c49e09992a13a4840edb48","955b63282c975ba379c4995cac1c2e1e7dfebe62@dcon.de","MinGW: disable CRT command line globbing\n\nMingwRT listens to _CRT_glob to decide if __getmainargs should\nperform globbing, with the default being that it should.\nUnfortunately, __getmainargs globbing is sub-par; for instance\npatterns like \"*.c\" will only match c-sources in the current\ndirectory.\n\nDisable __getmainargs' command line wildcard expansion, so these\npatterns will be left untouched, and handled by Git's superior\nbuilt-in globbing instead.\n\nMSVC defaults to no globbing, so we don't need to do anything\nin that case.\n\nThis fixes t5505 and t7810.\n\nSigned-off-by: Karsten Blees <blees@dcon.de>\nSigned-off-by: Erik Faye-Lund <kusmabite@gmail.com>\nSigned-off-by: Stepan Kasal <kasal@ucw.cz>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","Karsten Blees",false],["99c3c76d97164dba2cdd288281a0121de46f11e3","955b63282c975ba379c4995cac1c2e1e7dfebe62@dcon.de","Win32: Unicode arguments (outgoing)\n\nConvert command line arguments from UTF-8 to UTF-16 when creating other\nprocesses.\n\nSigned-off-by: Karsten Blees <blees@dcon.de>\nSigned-off-by: Stepan Kasal <kasal@ucw.cz>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","Karsten Blees",false],["3f046148d92e1aa6c0872a6f11f39a4a5740f939","955b63282c975ba379c4995cac1c2e1e7dfebe62@dcon.de","Win32: Unicode arguments (incoming)\n\nConvert command line arguments from UTF-16 to UTF-8 on startup.\n\nSigned-off-by: Karsten Blees <blees@dcon.de>\nSigned-off-by: Stepan Kasal <kasal@ucw.cz>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","Karsten Blees",false]],"size":29,"ref":"refs/heads/verify-commit","head":"a4e0fe9e7fdcf33f36514f68fe27390edb4e03b7"}