)]}'
{
  "commit": "d8890ce72609b3f7a002ed38b4ed832b6a97fc5c",
  "tree": "739adf67841cc6516fc40d430ab5c03bf85119b7",
  "parents": [
    "a8248f4a8dfc43177bbbcd9b874fc4e0cbf6b322"
  ],
  "author": {
    "name": "Karsten Blees",
    "email": "blees@dcon.de",
    "time": "Fri Jan 07 17:57:02 2011 +0100"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Mon Jun 09 15:10:53 2014 -0700"
  },
  "message": "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 \u003d\u003d INVALID_HANDLE_VALUE and dd_handle \u003d\u003d 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 \u003d\u003d INVALID_HANDLE_VALUE \u0026\u0026\n  dd_stat !\u003d 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 (-\u003e ENOTDIR), otherwise we can use\n  err_win_to_posix (e.g. ERROR_PATH_NOT_FOUND -\u003e 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 \u0027*\u0027 always finds \u0027.\u0027 and \u0027..\u0027),\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 \u003cblees@dcon.de\u003e\nSigned-off-by: Erik Faye-Lund \u003ckusmabite@gmail.com\u003e\nSigned-off-by: Stepan Kasal \u003ckasal@ucw.cz\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "fac7f2504731c8494a63a41dc3ba035a081c472c",
      "old_mode": 33188,
      "old_path": "compat/win32/dirent.c",
      "new_id": "82a515c21b322a0e50c7b5dbdd12e74341b20e98",
      "new_mode": 33188,
      "new_path": "compat/win32/dirent.c"
    }
  ]
}
