)]}'
{
  "commit": "179f122aea7074a21ea095337c96801695ba3729",
  "tree": "cb04b37bee579b84c05799eb6be9b83423a5df11",
  "parents": [
    "a89346e34a937f001e5d397ee62224e3e9852040"
  ],
  "author": {
    "name": "Johannes Schindelin",
    "email": "johannes.schindelin@gmx.de",
    "time": "Thu Jun 04 16:24:19 2026 +0000"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Fri Jun 05 22:39:57 2026 +0900"
  },
  "message": "mingw: kill child processes in a gentler way\n\nThe TerminateProcess() function does not actually leave the child\nprocesses any chance to perform any cleanup operations. This is bad\ninsofar as Git itself expects its signal handlers to run.\n\nA symptom is e.g. a left-behind .lock file that would not be left behind\nif the same operation was run, say, on Linux.\n\nTo remedy this situation, we use an obscure trick: we inject a thread\ninto the process that needs to be killed and to let that thread run the\nExitProcess() function with the desired exit status. Thanks J Wyman for\ndescribing this trick.\n\nThe advantage is that the ExitProcess() function lets the atexit\nhandlers run. While this is still different from what Git expects (i.e.\nrunning a signal handler), in practice Git sets up signal handlers and\natexit handlers that call the same code to clean up after itself.\n\nIn case that the gentle method to terminate the process failed, we still\nfall back to calling TerminateProcess(), but in that case we now also\nmake sure that processes spawned by the spawned process are terminated;\nTerminateProcess() does not give the spawned process a chance to do so\nitself.\n\nPlease note that this change only affects how Git for Windows tries to\nterminate processes spawned by Git\u0027s own executables. Third-party\nsoftware that *calls* Git and wants to terminate it *still* need to make\nsure to imitate this gentle method, otherwise this patch will not have\nany effect.\n\nSigned-off-by: Johannes Schindelin \u003cjohannes.schindelin@gmx.de\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "aa7525f419cb642d5b3a28f93c55d09517af8e2c",
      "old_mode": 33188,
      "old_path": "compat/mingw.c",
      "new_id": "44c63059cd69169941da5dbe571c765e941b6721",
      "new_mode": 33188,
      "new_path": "compat/mingw.c"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "d53989884cfb0cedf14843fba2ddc378a5dcb057",
      "new_mode": 33188,
      "new_path": "compat/win32/exit-process.h"
    }
  ]
}
