)]}'
{
  "commit": "8cbf7d2a4748b37d70323f45a378aee8a9a96f8a",
  "tree": "d0e385414e50ab895d3b540975937718de9fab27",
  "parents": [
    "f8297737722d63ba4a23c8df21765ab5a8368d64"
  ],
  "author": {
    "name": "Simon Marchi",
    "email": "simon.marchi@polymtl.ca",
    "time": "Mon Mar 24 16:20:27 2025 -0400"
  },
  "committer": {
    "name": "Simon Marchi",
    "email": "simon.marchi@efficios.com",
    "time": "Tue Mar 25 11:32:35 2025 -0400"
  },
  "message": "gdb/dwarf: remove unnecessary comparison in cooked_index_entry::compare\n\nI believe that the `(mode \u003d\u003d MATCH \u0026\u0026 a \u003d\u003d munge (\u0027\u003c\u0027))` part of the\ncondition is unnecesary.  Or perhaps I don\u0027t understand the algorithm.\n\nThe use of \"munge\" above effectively makes it so that the template\nportion of names is completely ignored for the sake of the comparison.\n\nThen, in the condition, this:\n\n    a \u003d\u003d munge (\u0027\u003c\u0027)\n\nis functionally equivalent to\n\n    a \u003d\u003d \u0027\\0\u0027\n\nIf `a` is indeed \u0027\\0\u0027, and `b` is also \u0027\\0\u0027, then we would have taken\nthe earlier branch:\n\n    if (a \u003d\u003d b)\n      return 0;\n\nIf `b` is not \u0027\\0\u0027, then we won\u0027t take this branch and we\u0027ll go into the\nfinal comparison:\n\n    return a \u003c b ? -1 : 1;\n\nSo, as far as I can see, there is no case where `mode \u003d\u003d MATCH`, where\nwe\u0027re going to use this special `return 0`.\n\nRegression tested using the various DWARF target boards on Debian 12.\n\nChange-Id: I5ea0463c1fdbbc1b003de2f0a423fd0073cc9dec\nApproved-By: Tom Tromey \u003ctom@tromey.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "724615f497e31a576f8f1f597727ea25e5abd1e8",
      "old_mode": 33188,
      "old_path": "gdb/dwarf2/cooked-index.c",
      "new_id": "1a2e19debab597016b52eebd99cb0a3f69cb4421",
      "new_mode": 33188,
      "new_path": "gdb/dwarf2/cooked-index.c"
    }
  ]
}
