)]}'
{
  "commit": "f293bdcc29f91e3e56c478473a85a8e13e6fd87c",
  "tree": "355eca75d4ac027a47f59e8386f4cf6eb02d8e16",
  "parents": [
    "c0c4dc0b700f0f97cbe7a06ab555cd6912dc924c"
  ],
  "author": {
    "name": "René Scharfe",
    "email": "l.s.r@web.de",
    "time": "Sun Dec 14 16:57:06 2025 +0100"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Tue Dec 16 10:23:26 2025 +0900"
  },
  "message": "diff-files: fix copy detection\n\nCopy detection cannot work when comparing the index to the working tree\nbecause Git ignores files that it is not explicitly told to track.  It\nshould work in the other direction, though, i.e. for a reverse diff of\nthe deletion of a copy from the index.\n\nd1f2d7e8ca (Make run_diff_index() use unpack_trees(), not read_tree(),\n2008-01-19) broke it with a seemingly stray change to run_diff_files().\n\nWe didn\u0027t notice because there\u0027s no test for that.  But even if we had\none, it might have gone unnoticed because the breakage only happens\nwith index preloading, which requires at least 1000 entries (more than\nmost test repos have) and is racy because it runs in parallel with the\nactual command.\n\nFix copy detection by queuing up-to-date and skip-worktree entries using\ndiff_same().\n\nWhile at it, use diff_same() also for queuing unchanged files not\nflagged as up-to-date, i.e. clean submodules and entries where\npreloading was not done at all or not quickly enough.  It uses less\nmemory than diff_change() and doesn\u0027t unnecessarily set the diff flag\nhas_changes.\n\nAdd two tests to cover running both without and with preloading.  The\nfirst one passes reliably with the original code.  The second one\nenables preloading and thus is racy.  It has a good chance to pass even\nwithout the fix, but fails within seconds when running the test script\nwith --stress.  With the fix it runs fine for several minutes, until\nmy patience runs out.\n\nSigned-off-by: René Scharfe \u003cl.s.r@web.de\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "8e624f38c6d6f34bb499bbd8b6a96fb6c0ca09da",
      "old_mode": 33188,
      "old_path": "diff-lib.c",
      "new_id": "5307390ff3db7bd90cc01913cefb76eb5e1a5d9d",
      "new_mode": 33188,
      "new_path": "diff-lib.c"
    },
    {
      "type": "modify",
      "old_id": "e8faf0dd2ef1c5e0dc3aebe19276843d62a658e5",
      "old_mode": 33261,
      "old_path": "t/t4007-rename-3.sh",
      "new_id": "34f7d276d116e070d0d972384e30a55de904b54b",
      "new_mode": 33261,
      "new_path": "t/t4007-rename-3.sh"
    }
  ]
}
