{"push_id":984688039,"size":53,"distinct_size":0,"ref":"refs/heads/jk/tree-corruption","head":"836912ef125d11439440dd8b458f88cada9053ee","before":"46e5105c14feb704b08636a28b697a4274f55f27","commits":[{"sha":"f9206ce26818c3fc1cfd12cfce0acf0bd582270a","author":{"email":"53fb8db7833fca1e1746dd8592f61048d350f64c@gmx.de","name":"Johannes Schindelin"},"message":"mingw: let's use gettext with MSYS2\n\nThis solves two problems:\n\n- we now have proper localisation even on Windows\n\n- we sidestep the infamous \"BUG: your vsnprintf is broken (returned -1)\"\n  message when running \"git init\" (which otherwise prevents the entire\n  test suite from running) because libintl.h overrides vsnprintf() with\n  libintl_vsnprintf() [*1*]\n\nThe latter issue is rather crucial, as *no* test passes in Git for\nWindows without this fix.\n\nFootnote *1*: gettext_git=http://git.savannah.gnu.org/cgit/gettext.git\n$gettext_git/tree/gettext-runtime/intl/libgnuintl.in.h#n380\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/f9206ce26818c3fc1cfd12cfce0acf0bd582270a"},{"sha":"b640b77fea7db4c6eb667abf8e9a2b21cf0e72f5","author":{"email":"53fb8db7833fca1e1746dd8592f61048d350f64c@gmx.de","name":"Johannes Schindelin"},"message":"mingw: do not trust MSYS2's MinGW gettext.sh\n\nIt does not quite work because it produces DOS line endings which the\nshell does not like at all.\n\nThis lets t0200-gettext-basic.sh, t0204-gettext-reencode-sanity.sh,\nt3406-rebase-message.sh, t3903-stash.sh, t7400-submodule-basic.sh,\nt7401-submodule-summary.sh, t7406-submodule-update.sh and\nt7407-submodule-foreach.sh pass in Git for Windows' SDK.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/b640b77fea7db4c6eb667abf8e9a2b21cf0e72f5"},{"sha":"888ab716adff5babae718e4e4cb83b3c3a5f1bc5","author":{"email":"53fb8db7833fca1e1746dd8592f61048d350f64c@gmx.de","name":"Johannes Schindelin"},"message":"Git.pm: stop assuming that absolute paths start with a slash\n\nOn Windows, absolute paths never start with a slash, unless a POSIX\nemulation layer is used. The latter is the case for MSYS2's Perl that\nGit for Windows leverages. However, in the tests we also go through\nplain `git.exe`, which does *not* leverage the POSIX emulation layer,\nand therefore the paths we pass to Perl may actually be DOS-style paths\nsuch as C:/Program Files/Git.\n\nSo let's just use Perl's own way to test whether a given path is\nabsolute or not instead of home-brewing our own.\n\nThis patch partially fixes t7800 and t9700 when running in Git for\nWindows' SDK.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/888ab716adff5babae718e4e4cb83b3c3a5f1bc5"},{"sha":"02e6edc082969c3f52ea954e71b391410632dfba","author":{"email":"955b63282c975ba379c4995cac1c2e1e7dfebe62@dcon.de","name":"Karsten Blees"},"message":"mingw: factor out Windows specific environment setup\n\nWe will add more environment-related code to that new function\nin the next patch.\n\nSigned-off-by: Karsten Blees <blees@dcon.de>\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/02e6edc082969c3f52ea954e71b391410632dfba"},{"sha":"1fc7bf79e5f907b85aa0213c0ad4969506cf8f2b","author":{"email":"53fb8db7833fca1e1746dd8592f61048d350f64c@gmx.de","name":"Johannes Schindelin"},"message":"mingw: prepare the TMPDIR environment variable for shell scripts\n\nWhen shell scripts access a $TMPDIR variable containing backslashes,\nthey will be mistaken for escape characters. Let's not let that happen\nby converting them to forward slashes.\n\nThis partially fixes t7800 with MSYS2.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/1fc7bf79e5f907b85aa0213c0ad4969506cf8f2b"},{"sha":"4426fb51421cdbf6f8d4c8dfb8bffd7adb51e034","author":{"email":"2558ed3b72bea7911f0793eb177ffec00ae2aab0@hamal.uberspace.de","name":"마누엘"},"message":"mingw: try to delete target directory before renaming\n\nWhen the rename() function tries to move a directory it fails if the\ntarget directory exists. It should check if it can delete the (possibly\nempty) target directory and then try again to move the directory.\n\nThis partially fixes t9100-git-svn-basic.sh.\n\nSigned-off-by: 마누엘 <nalla@hamal.uberspace.de>\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/4426fb51421cdbf6f8d4c8dfb8bffd7adb51e034"},{"sha":"4b0abd5c695c87bf600e57b6a5c7d6844707d34c","author":{"email":"53fb8db7833fca1e1746dd8592f61048d350f64c@gmx.de","name":"Johannes Schindelin"},"message":"mingw: let lstat() fail with errno == ENOTDIR when appropriate\n\nPOSIX semantics requires lstat() to fail with ENOTDIR when \"[a]\ncomponent of the path prefix names an existing file that is neither a\ndirectory nor a symbolic link to a directory\".\n\nSee http://pubs.opengroup.org/onlinepubs/9699919799/functions/lstat.html\n\nThis behavior is expected by t1404-update-ref-df-conflicts now.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/4b0abd5c695c87bf600e57b6a5c7d6844707d34c"},{"sha":"3064d5a38c72532e603faed4c63042b375ded2c7","author":{"email":"53fb8db7833fca1e1746dd8592f61048d350f64c@gmx.de","name":"Johannes Schindelin"},"message":"mingw: fix t5601-clone.sh\n\nSince baaf233 (connect: improve check for plink to reduce false\npositives, 2015-04-26), t5601 writes out a `plink.exe` for testing that\nis actually a shell script. So the assumption that the `.exe` extension\nimplies that the file is *not* a shell script is now wrong.\n\nSince there was no love for the idea of allowing `.exe` files to be\nshell scripts on Windows, let's go the other way round: *make*\n`plink.exe` a real `.exe`.\n\nThis fixes t5601-clone.sh in Git for Windows' SDK.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/3064d5a38c72532e603faed4c63042b375ded2c7"},{"sha":"fc56c7b34bd8027fb89ee432233f54028d71fb9e","author":{"email":"53fb8db7833fca1e1746dd8592f61048d350f64c@gmx.de","name":"Johannes Schindelin"},"message":"mingw: accomodate t0060-path-utils for MSYS2\n\nOn Windows, there are no POSIX paths, only Windows ones (an absolute\nWindows path looks like \"C:\\Program Files\\Git\\ReleaseNotes.html\", under\nmost circumstances, forward slashes are also allowed and synonymous to\nbackslashes).\n\nSo when a POSIX shell (such as MSYS2's Bash, which is used by Git for\nWindows to execute all those shell scripts that are part of Git) passes\na POSIX path to test-path-utils.exe (which is not POSIX-aware), the path\nis translated into a Windows path. For example, /etc/profile becomes\nC:/Program Files/Git/etc/profile.\n\nThis path translation poses a problem when passing the root directory as\nparameter to test-path-utils.exe, as it is not well defined whether the\ntranslated root directory should end in a slash or not. MSys1 stripped\nthe trailing slash, but MSYS2 does not.\n\nOriginally, the Git for Windows project patched MSYS2's runtime to\naccomodate Git's regression test, but we really should do it the other\nway round.\n\nTo work with both of MSys1's and MSYS2's behaviors, we simply test what\nthe current system does in the beginning of t0060-path-utils.sh and then\nadjust the expected longest ancestor length accordingly.\n\nIt looks quite a bit tricky what we actually do in this patch: first, we\nadjust the expected length for the trailing slash we did not originally\nexpect (subtracting one). So far, so good.\n\nBut now comes the part where things work in a surprising way: when the\nexpected length was 0, the prefix to match is the root directory. If the\nroot directory is converted into a path with a trailing slash, however,\nwe know that the logic in longest_ancestor_length() cannot match: to\navoid partial matches of the last directory component, it verifies that\nthe character after the matching prefix is a slash (but because the\nslash was part of the matching prefix, the next character cannot be a\nslash). So the return value is -1. Alas, this is exactly what the\nexpected length is after subtracting the value of $rootslash! So we skip\nadding the $rootoff value in that case (and only in that case).\n\nDirectories other than the root directory are handled fine (as they are\nspecified without a trailing slash, something not possible for the root\ndirectory, and MSYS2 converts them into Windows paths that also lack\ntrailing slashes), therefore we do not need any more special handling.\n\nThanks to Ray Donnelly for his patient help with this issue.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/fc56c7b34bd8027fb89ee432233f54028d71fb9e"},{"sha":"a1f32964daace31cb89bb153731528de6a16b351","author":{"email":"53fb8db7833fca1e1746dd8592f61048d350f64c@gmx.de","name":"Johannes Schindelin"},"message":"mingw: disable mkfifo-based tests\n\nMSYS2 (the POSIX emulation layer used by Git for Windows' Bash) actually\nhas a working mkfifo. The only problem is that it is only emulating\nnamed pipes through the MSYS2 runtime; The Win32 API has no idea about\nnamed pipes, hence the Git executable cannot access those pipes either.\n\nThe symptom is that Git fails with a '<name>: No such file or directory'\nbecause MSYS2 emulates named pipes through special-crafted '.lnk' files.\n\nThe solution is to tell the test suite explicitly that we cannot use\nnamed pipes when we want to test on Windows.\n\nThis lets t4056-diff-order.sh, t9010-svn-fe.sh and t9300-fast-import.sh\npass.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/a1f32964daace31cb89bb153731528de6a16b351"},{"sha":"9d1d2b7fad9bec6320a2058c625787c835864960","author":{"email":"a6723cc3f76163bf7adb636a73ac3b0ceb3e6b9b@pobox.com","name":"Junio C Hamano"},"message":"git: remove an early return from save_env_before_alias()\n\nWhen help.autocorrect is in effect, an attempt to auto-execute an\nuniquely corrected result of a misspelt alias will result in an\nirrelevant error message.  The codepath that causes this calls\nsave_env_before_alias() and restore_env() in handle_alias(), and\nthat happens twice.  A global variable orig_cwd is allocated to hold\nthe return value of getcwd() in save_env_before_alias(), which is\nthen used in restore_env() to go back to that directory and finally\nfree(3)'d there.\n\nHowever, save_env_before_alias() is not prepared to be called twice.\nIt returns early when it knows it has already been called, leaving\norig_cwd undefined, which is then checked in the second call to\nrestore_env(), and by that time, the memory that used to hold the\ncontents of orig_cwd is either freed or reused to hold something\nelse, and this is fed to chdir(2), causing it to fail.  Even if it\ndid not fail (i.e. reading of the already free'd piece of memory\nyielded a directory path that we can chdir(2) to), it then gets\nfree(3)'d.\n\nFix this by making sure save_env() does do the saving when called.\n\nWhile at it, add a minimal test for help.autocorrect facility.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/9d1d2b7fad9bec6320a2058c625787c835864960"},{"sha":"2e1175d43d05e83fe836e1c8c8e7c25b7ee659ae","author":{"email":"a6723cc3f76163bf7adb636a73ac3b0ceb3e6b9b@pobox.com","name":"Junio C Hamano"},"message":"git: protect against unbalanced calls to {save,restore}_env()\n\nWe made sure that save_env_before_alias() does not skip saving the\nenvironment when asked to (which led to use-after-free of orig_cwd\nin restore_env() in the buggy version) with the previous step.\n\nProtect against future breakage where somebody adds new callers of\nthese functions in an unbalanced fashion.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/2e1175d43d05e83fe836e1c8c8e7c25b7ee659ae"},{"sha":"441981bc85ea2b648d7ffb2515b371071208e657","author":{"email":"a6723cc3f76163bf7adb636a73ac3b0ceb3e6b9b@pobox.com","name":"Junio C Hamano"},"message":"git: simplify environment save/restore logic\n\nThe only code that cares about the value of the global variable\nsaved_env_before_alias after the previous fix is handle_builtin()\nthat turns into a glorified no-op when the variable is true, so the\nlogic could safely be lifted to its caller, i.e. the caller can\nrefrain from calling it when the variable is set.\n\nThis variable tells us if save_env_before_alias() was called (with\nor without matching restore_env()), but the sole caller of the\nfunction, handle_alias(), always calls it as the first thing, so we\ncan consider that the variable essentially keeps track of the fact\nthat handle_alias() has ever been called.\n\nIt turns out that handle_builtin() and handle_alias() are called\nonly from one function in a way that the value of the variable\nmatters, which is run_argv(), and it already keeps track of the\nfact that it already called handle_alias().\n\nSo we can simplify the whole thing by:\n\n- Change handle_builtin() to always make a direct call to the\n  builtin implementation it finds, and make sure the caller\n  refrains from calling it if handle_alias() has ever been\n  called;\n\n- Remove saved_env_before_alias variable, and instead use the\n  local \"done_alias\" variable maintained inside run_argv() to\n  make the same decision.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/441981bc85ea2b648d7ffb2515b371071208e657"},{"sha":"a390d7e8f96fbc40e8eaf5180e3e1422f5d7ddc2","author":{"email":"53fb8db7833fca1e1746dd8592f61048d350f64c@gmx.de","name":"Johannes Schindelin"},"message":"tests: turn off git-daemon tests if FIFOs are not available\n\nThe Git daemon tests create a FIFO first thing and will hang if said\nFIFO is not available.\n\nThis is a problem with Git for Windows, where `mkfifo` is an MSYS2\nprogram that leverages MSYS2's POSIX emulation layer, but\n`git-daemon.exe` is a MINGW program that has not the first clue about\nthat POSIX emulation layer and therefore blinks twice when it sees\nMSYS2's emulated FIFOs and then just stares into space.\n\nThis lets t5570-git-daemon.sh and t5811-proto-disable-git.sh pass.\n\nSigned-off-by: Stepan Kasal <kasal@ucw.cz>\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/a390d7e8f96fbc40e8eaf5180e3e1422f5d7ddc2"},{"sha":"8facec08fe45359e2147175cd8276df9c08b3fbc","author":{"email":"53fb8db7833fca1e1746dd8592f61048d350f64c@gmx.de","name":"Johannes Schindelin"},"message":"mingw: skip test in t1508 that fails due to path conversion\n\nIn Git for Windows, the MSYS2 POSIX emulation layer used by the Bash\nconverts command-line arguments that looks like they refer to a POSIX\npath containing a file list (i.e. @<absolute-path>) into a Windows path\nequivalent when calling non-MSYS2 executables, such as git.exe.\n\nLet's just skip the test that uses the parameter `@/at-test` that\nconfuses the MSYS2 runtime.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/8facec08fe45359e2147175cd8276df9c08b3fbc"},{"sha":"d53c2c67380f769f91fd45cc8c63a5883245ccca","author":{"email":"53fb8db7833fca1e1746dd8592f61048d350f64c@gmx.de","name":"Johannes Schindelin"},"message":"mingw: fix t9700's assumption about directory separators\n\nThis test assumed that there is only one directory separator (the\nforward slash), not two equivalent directory separators.\nHowever, on Windows, the back slash and the forward slash *are*\nequivalent.\n\nLet's paper over this issue by converting the backward slashes to\nforward ones in the test that fails with MSYS2 otherwise.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/d53c2c67380f769f91fd45cc8c63a5883245ccca"},{"sha":"fd318a941d8bb7cc832412f26a25313121cc0d21","author":{"email":"53fb8db7833fca1e1746dd8592f61048d350f64c@gmx.de","name":"Johannes Schindelin"},"message":"mingw: work around pwd issues in the tests\n\nIn Git for Windows' SDK, the tests are run using a Bash that relies on\nthe POSIX emulation layer MSYS2 (itself a friendly fork of Cygwin). As\nsuch, paths in tests can be POSIX paths. As soon as those paths are\npassed to git.exe (which does *not* use the POSIX emulation layer),\nthose paths are converted into Windows paths, though. This happens\nfor command-line parameters, but not when reading, say, config variables.\n\nTo help with that, the `pwd` command is overridden to return the Windows\npath of the current working directory when testing Git on Windows.\n\nHowever, when talking to anything using the POSIX emulation layer, it is\nreally much better to use POSIX paths because Windows paths contain a\ncolon after the drive letter that will easily be mistaken for the common\nseparator in path lists.\n\nSo let's just use the $PWD variable when the POSIX path is needed.\n\nThis lets t7800-difftool.sh, t9400-git-cvsserver-server.sh,\nt9402-git-cvsserver-refs.sh and t9401-git-cvsserver-crlf.sh pass in Git\nfor Windows' SDK.\n\nNote: the cvsserver tests require not only the `cvs` package (install\nit into Git for Windows' SDK via `pacman -S cvs`) but also the Perl\nSQLite bindings (install them into Git for Windows' SDK via\n`cpan DBD::SQLite`).\n\nThis patch is based on earlier work by 마누엘 and Karsten Blees.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/fd318a941d8bb7cc832412f26a25313121cc0d21"},{"sha":"2b3abd45bdd8a9dfd80dd07dfbc3745a69b21abc","author":{"email":"fe43a83262eef1680511f524a1e74d43c633cffe@users.sourceforge.net","name":"Pat Thoyts"},"message":"t0008: avoid absolute path\n\nThe colon is used by check-ignore to separate paths from other output\nvalues. If we use an absolute path, however, on Windows it will be\nconverted into a Windows path that very much contains a colon.\n\nIt is actually not at all necessary to make the path of the global\nexcludes absolute, so let's just not even do that.\n\nBased on suggestions by Karsten Blees and Junio Hamano.\n\nSuggested-by: Karsten Blees <karsten.blees@gmail.com>\nSigned-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/2b3abd45bdd8a9dfd80dd07dfbc3745a69b21abc"},{"sha":"bcb11f19e070d4647efe66400924bdddb65cd936","author":{"email":"53fb8db7833fca1e1746dd8592f61048d350f64c@gmx.de","name":"Johannes Schindelin"},"message":"mingw: mark t9100's test cases with appropriate prereqs\n\nMany a test requires either POSIXPERM (to change the executable bit) or\nSYMLINKS, and neither are available on Windows.\n\nThis lets t9100-git-svn-basic.sh pass in Git for Windows' SDK.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/bcb11f19e070d4647efe66400924bdddb65cd936"},{"sha":"75e005ec541e46f3cdec15143306c7189fd65a95","author":{"email":"53fb8db7833fca1e1746dd8592f61048d350f64c@gmx.de","name":"Johannes Schindelin"},"message":"mingw: avoid illegal filename in t9118\n\nOn Windows' file systems, file names with trailing dots are forbidden.\nThe POSIX emulation layer used by Git for Windows' Subversion emulates\nthose file names, therefore the test adding the file would actually\nsucceed, but when we would ask git.exe (which does not leverage the\nPOSIX emulation layer) to check out the tree, it would fail.\n\nLet's just guard the test using a filename that is illegal on Windows\nby the MINGW prereq.\n\nThis lets t9118-git-svn-funky-branch-names.sh pass in Git for Windows'\nSDK.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/75e005ec541e46f3cdec15143306c7189fd65a95"}]}