)]}'
{
  "commit": "835950bd19260426f664a9b0164c580db9f9aacb",
  "tree": "4da4e0ddf111a518fb2d95cee70e89806fae6a86",
  "parents": [
    "cba07a324d2cda06dd7a7b35b4579f800de024aa"
  ],
  "author": {
    "name": "Han Young",
    "email": "hanyang.tony@bytedance.com",
    "time": "Fri Jul 21 11:57:58 2023 +0800"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Fri Jul 21 07:32:58 2023 -0700"
  },
  "message": "blame: allow --contents to work with bare repo\n\nThe --contents option can be used with git blame to blame the file\nas if it had the contents from the specified file. Since 1a3119ed\n(blame: allow --contents to work with non-HEAD commit, 2023-03-24),\nthe --contents option can work with non-HEAD commit. However, if you\ntry to use --contents in a bare repository, you get the following\nerror:\n\n    fatal: this operation must be run in a work tree\n\nThis is because before trying to generate a fake working tree\ncommit, we always call setup_work_tree(). But in a bare repo,\nworking tree is not available. The call to setup_work_tree is used\nto prepare the reading of the blamed file in the working tree, which\nisn\u0027t necessary if we are reading the contents from the specific\nfile instead of the file in the working tree.\n\nAdd a check in setup_scoreboard to skip setup_work_tree if we are\nreading from the file specified in --contents.\n\nThis enables us to use --contents in a bare repo. This is a nice\naddition on top of 1a3119ed, having a working tree to use --contents\nis optional.\n\nAdd test for the --contents option with bare repo to the\nannotate-tests.sh test script.\n\nSigned-off-by: Han Young \u003chanyang.tony@bytedance.com\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "d12bd9f97ba5c1808913c72bac4473509c340827",
      "old_mode": 33188,
      "old_path": "blame.c",
      "new_id": "141756975bf5a58a1744eda78c1750d9d949272f",
      "new_mode": 33188,
      "new_path": "blame.c"
    },
    {
      "type": "modify",
      "old_id": "2ef70235b1010b1179e083e1e390b3ae7afabea4",
      "old_mode": 33188,
      "old_path": "t/annotate-tests.sh",
      "new_id": "5e21e84f3884eb8c787ab82a5d1360d2b7cffb74",
      "new_mode": 33188,
      "new_path": "t/annotate-tests.sh"
    }
  ]
}
