)]}'
{
  "commit": "2bbeddee5d36dfa3fab16ccd0b78dcdcf66c3a99",
  "tree": "82d33c6c544ffa2eaed5ec7ac9312ef0f45220a5",
  "parents": [
    "f9972720e9a405e4f6924a7cde0ed5880687f4d0"
  ],
  "author": {
    "name": "Jeff King",
    "email": "peff@peff.net",
    "time": "Sat Aug 19 19:53:42 2023 -0400"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Sat Aug 19 21:17:32 2023 -0700"
  },
  "message": "fsck: use enum object_type for fsck_walk callback\n\nWe switched the function interface for fsck callbacks in a1aad71601\n(fsck.h: use \"enum object_type\" instead of \"int\", 2021-03-28). However,\nwe accidentally flipped the type back to \"int\" as part of 0b4e9013f1\n(fsck: mark unused parameters in various fsck callbacks, 2023-07-03).\nThe mistake happened because that commit was written before a1aad71601\nand rebased forward, and I screwed up while resolving the conflict.\n\nCuriously, the compiler does not warn about this mismatch, at least not\nwhen using gcc and clang on Linux (nor in any of our CI environments).\nBased on 28abf260a5 (builtin/fsck.c: don\u0027t conflate \"int\" and \"enum\" in\ncallback, 2021-06-01), I\u0027d guess that this would cause the AIX xlc\ncompiler to complain. I noticed because clang-18\u0027s UBSan now identifies\nmis-matched function calls at runtime, and does complain of this case\nwhen running the test suite.\n\nI\u0027m not entirely clear on whether this mismatch is a problem in\npractice. Compilers are certainly free to make enums smaller than \"int\"\nif they don\u0027t need the bits, but I suspect that they have to promote\nback to int for function calls (though I didn\u0027t dig in the standard, and\nI won\u0027t be surprised if I\u0027m simply wrong and the real-world impact would\ndepend on the ABI).\n\nRegardless, switching it back to enum is obviously the right thing to do\nhere; the switch to \"int\" was simply a mistake.\n\nSigned-off-by: Jeff King \u003cpeff@peff.net\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "c1d02900268b03f385131bb41242c567505e2018",
      "old_mode": 33188,
      "old_path": "builtin/fsck.c",
      "new_id": "611925905e4fd1d972565806156059016d2eb1a6",
      "new_mode": 33188,
      "new_path": "builtin/fsck.c"
    }
  ]
}
