)]}'
{
  "commit": "ff5b7913f0af62c26682b0376d0aa2d7f5d74b2e",
  "tree": "aad74a2cbc13e6a73598b131a115977a56b08689",
  "parents": [
    "324b170b88475811cb0506a30b4710ffc89ae936"
  ],
  "author": {
    "name": "Elijah Newren",
    "email": "newren@gmail.com",
    "time": "Wed Jan 26 01:43:45 2022 +0000"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Wed Jan 26 12:01:54 2022 -0800"
  },
  "message": "sequencer, stash: fix running from worktree subdir\n\nIn commits bc3ae46b42 (\"rebase: do not attempt to remove\nstartup_info-\u003eoriginal_cwd\", 2021-12-09) and 0fce211ccc (\"stash: do not\nattempt to remove startup_info-\u003eoriginal_cwd\", 2021-12-09), we wanted to\nallow the subprocess to know which directory the parent process was\nrunning from, so that the subprocess could protect it.  However...\n\nWhen run from a non-main worktree, setup_git_directory() will note\nthat the discovered git directory\n(/PATH/TO/.git/worktree/non-main-worktree) does not match\nDEFAULT_GIT_DIR_ENVIRONMENT (see setup_discovered_git_dir()), and\ndecide to set GIT_DIR in the environment.  This matters because...\n\nWhenever git is run with the GIT_DIR environment variable set, and\nGIT_WORK_TREE not set, it presumes that \u0027.\u0027 is the working tree.  So...\n\nThis combination results in the subcommand being very confused about\nthe working tree.  Fix it by also setting the GIT_WORK_TREE environment\nvariable along with setting cmd.dir.\n\nA possibly more involved fix we could consider for later would be to\nmake setup.c set GIT_WORK_TREE whenever (a) it discovers both the git\ndirectory and the working tree and (b) it decides to set GIT_DIR in the\nenvironment.  I did not attempt that here as such would be too big of a\nchange for a 2.35.1 release.\n\nTest-case-by: Glen Choo \u003cchooglen@google.com\u003e\nSigned-off-by: Elijah Newren \u003cnewren@gmail.com\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "de0e432a4ff901ce48508d879d35dc9d4238b457",
      "old_mode": 33188,
      "old_path": "builtin/stash.c",
      "new_id": "a8a543855e8d7afa6c58d1d7742d33101d37f061",
      "new_mode": 33188,
      "new_path": "builtin/stash.c"
    },
    {
      "type": "modify",
      "old_id": "83f257e7fa4187cabf86bb4c3304f952b16e0c61",
      "old_mode": 33188,
      "old_path": "sequencer.c",
      "new_id": "3fa17c98b71b26201ac0325d82a73aa632bd7e77",
      "new_mode": 33188,
      "new_path": "sequencer.c"
    },
    {
      "type": "modify",
      "old_id": "23dbd3c82ed6a21ff7bd883c20a7c45822421250",
      "old_mode": 33261,
      "old_path": "t/t3400-rebase.sh",
      "new_id": "71b1735e1dd180bb16a72df76b1b49f49a59072d",
      "new_mode": 33261,
      "new_path": "t/t3400-rebase.sh"
    }
  ]
}
