)]}'
{
  "commit": "7ea0c2f44dae65630e53bf36000933f8042eecda",
  "tree": "e64ff1703f227570ef99c1e855b05b56f4846b1b",
  "parents": [
    "3a238e539bcdfe3f9eb5010fd218640c1b499f7a"
  ],
  "author": {
    "name": "Orgad Shaneh",
    "email": "orgads@gmail.com",
    "time": "Fri Sep 04 13:50:49 2020 +0000"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Sun Sep 06 09:50:49 2020 -0700"
  },
  "message": "fetch: do not look for submodule changes in unchanged refs\n\nWhen fetching recursively with submodules, for each ref in the\nsuperproject, we call check_for_new_submodule_commits() which collects all\nthe objects that have to be checked for submodule changes on\ncalculate_changed_submodule_paths(). On the first call, it also collects all\nthe existing refs for excluding them from the scan.\n\ncalculate_changed_submodule_paths() creates an argument array with all the\ncollected new objects, followed by --not and all the old objects. This argv\nis passed to setup_revisions, which parses each argument, converts it back\nto an oid and resolves the object. The parsing itself also does redundant\nwork, because it is treated like user input, while in fact it is a full\noid. So it needlessly attempts to look it up as ref (checks if it has ^, ~\netc.), checks if it is a file name etc.\n\nFor a repository with many refs, all of this is expensive. But if the fetch\nin the superproject did not update the ref (i.e. the objects that are\nrequired to exist in the submodule did not change), there is no need to\ninclude it in the list.\n\nBefore commit be76c212 (fetch: ensure submodule objects fetched,\n2018-12-06), submodule reference changes were only detected for refs that\nwere changed, but not for new refs. This commit covered also this case, but\nwhat it did was to just include every ref.\n\nThis change should reduce the number of scanned refs by about half (except\nthe case of a no-op fetch, which will not scan any ref), because all the\nexisting refs will still be listed after --not.\n\nThe regression was reported here:\nhttps://public-inbox.org/git/CAGHpTBKSUJzFSWc\u003duznSu2zB33qCSmKXM-\niAjxRCpqNK5bnhRg@mail.gmail.com/\n\nSigned-off-by: Orgad Shaneh \u003corgads@gmail.com\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "a6d326866112758f62b50d7b36eab1314bda5e6f",
      "old_mode": 33188,
      "old_path": "builtin/fetch.c",
      "new_id": "b66e6c43e732ef3de1afae77fa9ded3ddde741c6",
      "new_mode": 33188,
      "new_path": "builtin/fetch.c"
    }
  ]
}
