)]}'
{
  "commit": "2d207ed1eccae17ca5ba29920841d0e31c27e3f0",
  "tree": "f9813726de592c0d362c7c35bdb052af03f014ac",
  "parents": [
    "d50a5e8939abfc07c2ff97ae72e9330939b36ee0"
  ],
  "author": {
    "name": "Mark Mentovai",
    "email": "mark@chromium.org",
    "time": "Wed May 28 16:17:37 2025 -0400"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Fri May 30 14:55:03 2025 -0700"
  },
  "message": "t: run tests from a normalized working directory\n\nSome tests make git perform actions that produce observable pathnames,\nand have expectations on those paths. Tests run with $HOME set to a\n$TRASH_DIRECTORY, and with their working directory the same\n$TRASH_DIRECTORY, although these paths are logically identical, they do\nnot observe the same pathname canonicalization rules and thus might not\nbe represented by strings that compare equal. In particular, no pathname\nnormalization is applied to $TRASH_DIRECTORY or $HOME, while tests\nchange their working directory with `cd -P`, which normalizes the\nworking directory\u0027s path by fully resolving symbolic links.\n\nt7900\u0027s macOS maintenance tests (which are not limited to running on\nmacOS) have an expectation on a path that `git maintenance` forms by\nusing abspath.c strbuf_realpath() to resolve a canonical absolute path\nbased on $HOME. When t7900 runs from a working directory that contains\nsymbolic links in its pathname, $HOME will also contain symbolic links,\nwhich `git maintenance` resolves but the test\u0027s expectation does not,\ncausing a test failure.\n\nAlign $TRASH_DIRECTORY and $HOME with the normalized path as used for\nthe working directory by resetting them to match the working directory\nafter it\u0027s established by `cd -P`. With all paths in agreement and\nsymbolic links resolved, pathname expectations can be set and met based\non string comparison without regard to external environmental factors\nsuch as the presence of symbolic links in a path.\n\nSuggested-by: Junio C Hamano \u003cgitster@pobox.com\u003e\nSigned-off-by: Mark Mentovai \u003cmark@chromium.org\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "9001ed3a6470a2b4d1ab27c4f26f35f356256fbe",
      "old_mode": 33188,
      "old_path": "t/test-lib.sh",
      "new_id": "e2e91b5b24df904cac7be56511ba9ea228013742",
      "new_mode": 33188,
      "new_path": "t/test-lib.sh"
    }
  ]
}
