)]}'
{
  "commit": "4ef346482d6d5748861c1aa9d56712e847369b40",
  "tree": "074ab774624ffb5f5d2ab6c8f4e28a2cbb1565c6",
  "parents": [
    "f8692114dbb1b3ffe0b71871a015c632c195b784"
  ],
  "author": {
    "name": "Hariom Verma",
    "email": "hariom18599@gmail.com",
    "time": "Sun Feb 23 18:57:10 2020 +0000"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Mon Feb 24 11:14:43 2020 -0800"
  },
  "message": "receive.denyCurrentBranch: respect all worktrees\n\nThe receive.denyCurrentBranch config option controls what happens if\nyou push to a branch that is checked out into a non-bare repository.\nBy default, it rejects it. It can be disabled via `ignore` or `warn`.\nAnother yet trickier option is `updateInstead`.\n\nHowever, this setting was forgotten when the git worktree command was\nintroduced: only the main worktree\u0027s current branch is respected.\n\nWith this change, all worktrees are respected.\n\nThat change also leads to revealing another bug,\ni.e. `receive.denyCurrentBranch \u003d true` was ignored when pushing into a\nnon-bare repository\u0027s unborn current branch using ref namespaces. As\n`is_ref_checked_out()` returns 0 which means `receive-pack` does not get\ninto conditional statement to switch `deny_current_branch` accordingly\n(ignore, warn, refuse, unconfigured, updateInstead).\n\nreceive.denyCurrentBranch uses the function `refs_resolve_ref_unsafe()`\n(called via `resolve_refdup()`) to resolve the symbolic ref HEAD, but\nthat function fails when HEAD does not point at a valid commit.\nAs we replace the call to `refs_resolve_ref_unsafe()` with\n`find_shared_symref()`, which has no problem finding the worktree for a\ngiven branch even if it is unborn yet, this bug is fixed at the same\ntime: receive.denyCurrentBranch now also handles worktrees with unborn\nbranches as intended even while using ref namespaces.\n\nHelped-by: Johannes Schindelin \u003cjohannes.schindelin@gmx.de\u003e\nSigned-off-by: Hariom Verma \u003chariom18599@gmail.com\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "411e0b4d999acb36fb05ebde7598568f2c88dd4b",
      "old_mode": 33188,
      "old_path": "builtin/receive-pack.c",
      "new_id": "2cc18bbffdcf41cf2510becf6fcdd74c5946494a",
      "new_mode": 33188,
      "new_path": "builtin/receive-pack.c"
    },
    {
      "type": "modify",
      "old_id": "e3975bd21de9d4a6a1adac21e7e8ae8d227a23da",
      "old_mode": 33261,
      "old_path": "t/t5509-fetch-push-namespaces.sh",
      "new_id": "a67f792adf4a2fb846ade40eb26acfcb08ba5d1b",
      "new_mode": 33261,
      "new_path": "t/t5509-fetch-push-namespaces.sh"
    },
    {
      "type": "modify",
      "old_id": "c81ca360ac4ac9edccf86132aa63e44812906980",
      "old_mode": 33261,
      "old_path": "t/t5516-fetch-push.sh",
      "new_id": "49982b0fd90d62b310907f698d00c5b718d8aa15",
      "new_mode": 33261,
      "new_path": "t/t5516-fetch-push.sh"
    }
  ]
}
