)]}'
{
  "commit": "8c1ce2204cc755bdafec85aaa4ac9c5a686a8bf4",
  "tree": "07546d608dd8ecbfc41ca0da92a41885134caeff",
  "parents": [
    "f6c5ca387a7693b16158826d157178be0ba439dc"
  ],
  "author": {
    "name": "Karthik Nayak",
    "email": "karthik.188@gmail.com",
    "time": "Sat Nov 08 22:51:56 2025 +0100"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Mon Nov 10 09:28:48 2025 -0800"
  },
  "message": "maintenance: add checking logic in `pack_refs_condition()`\n\nThe \u0027git-maintenance(1)\u0027 command supports an \u0027--auto\u0027 flag. Usage of the\nflag ensures to run maintenance tasks only if certain thresholds are\nmet. The heuristic is defined on a task level, wherein each task defines\nan \u0027auto_condition\u0027, which states if the task should be run.\n\nThe \u0027pack-refs\u0027 task is hard-coded to return 1 as:\n1. There was never a way to check if the reference backend needs to be\noptimized without actually performing the optimization.\n2. We can pass in the \u0027--auto\u0027 flag to \u0027git-pack-refs(1)\u0027 which would\noptimize based on heuristics.\n\nThe previous commit added a `refs_optimize_required()` function, which\ncan be used to check if a reference backend required optimization. Use\nthis within `pack_refs_condition()`.\n\nThis allows us to add a \u0027git maintenance is-needed\u0027 subcommand which can\nnotify the user if maintenance is needed without actually performing the\noptimization. Without this change, the reference backend would always\nstate that optimization is needed.\n\nSince we import \u0027revision.h\u0027, we need to remove the definition for\n\u0027SEEN\u0027 which is duplicated in the included header.\n\nSigned-off-by: Karthik Nayak \u003ckarthik.188@gmail.com\u003e\nAcked-by: Patrick Steinhardt \u003cps@pks.im\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "c6d62c74a7169ff0e844435044991eb9c14824ba",
      "old_mode": 33188,
      "old_path": "builtin/gc.c",
      "new_id": "85e9a38d103522c2e12581d14d6061f4a9147a9f",
      "new_mode": 33188,
      "new_path": "builtin/gc.c"
    },
    {
      "type": "modify",
      "old_id": "1499f63d507c32c5c1c2b1d0244beb584439c7d4",
      "old_mode": 33188,
      "old_path": "object.h",
      "new_id": "832299e763876c66038753bf24be75eab82025ad",
      "new_mode": 33188,
      "new_path": "object.h"
    }
  ]
}
