)]}'
{
  "commit": "916d0626c202c18e6d615abb69ba1f15b335c3ea",
  "tree": "3a052dc0dcd5fbbcac543265fddd76b15f0e3a23",
  "parents": [
    "65d655b52df3d4db0b4980f60106ed9785d025f8"
  ],
  "author": {
    "name": "Derrick Stolee",
    "email": "dstolee@microsoft.com",
    "time": "Thu Sep 17 18:11:50 2020 +0000"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Thu Sep 17 11:30:05 2020 -0700"
  },
  "message": "maintenance: use pointers to check --auto\n\nThe \u0027git maintenance run\u0027 command has an \u0027--auto\u0027 option. This is used\nby other Git commands such as \u0027git commit\u0027 or \u0027git fetch\u0027 to check if\nmaintenance should be run after adding data to the repository.\n\nPreviously, this --auto option was only used to add the argument to the\n\u0027git gc\u0027 command as part of the \u0027gc\u0027 task. We will be expanding the\nother tasks to perform a check to see if they should do work as part of\nthe --auto flag, when they are enabled by config.\n\nFirst, update the \u0027gc\u0027 task to perform the auto check inside the\nmaintenance process. This prevents running an extra \u0027git gc --auto\u0027\ncommand when not needed. It also shows a model for other tasks.\n\nSecond, use the \u0027auto_condition\u0027 function pointer as a signal for\nwhether we enable the maintenance task under \u0027--auto\u0027. For instance, we\ndo not want to enable the \u0027fetch\u0027 task in \u0027--auto\u0027 mode, so that\nfunction pointer will remain NULL.\n\nNow that we are not automatically calling \u0027git gc\u0027, a test in\nt5514-fetch-multiple.sh must be changed to watch for \u0027git maintenance\u0027\ninstead.\n\nWe continue to pass the \u0027--auto\u0027 option to the \u0027git gc\u0027 command when\nnecessary, because of the gc.autoDetach config option changes behavior.\nLikely, we will want to absorb the daemonizing behavior implied by\ngc.autoDetach as a maintenance.autoDetach config option.\n\nSigned-off-by: Derrick Stolee \u003cdstolee@microsoft.com\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "55a3d836f0a476531fa41fef977be91d2f52e64d",
      "old_mode": 33188,
      "old_path": "builtin/gc.c",
      "new_id": "13c24bca7df771daaf4840985593fbf8d4bc4b1d",
      "new_mode": 33188,
      "new_path": "builtin/gc.c"
    },
    {
      "type": "modify",
      "old_id": "de8e2f15319b4f9d7ab2b189d52dd013f79033a8",
      "old_mode": 33261,
      "old_path": "t/t5514-fetch-multiple.sh",
      "new_id": "bd202ec6f31e4b4197d89deda06cb1485fdbc1f3",
      "new_mode": 33261,
      "new_path": "t/t5514-fetch-multiple.sh"
    },
    {
      "type": "modify",
      "old_id": "8a162a18ba32fdc09403d65b5344bdd3d6d0df73",
      "old_mode": 33261,
      "old_path": "t/t7900-maintenance.sh",
      "new_id": "53c883531e440c0d55db95134bab5a17e96a71e1",
      "new_mode": 33261,
      "new_path": "t/t7900-maintenance.sh"
    }
  ]
}
