)]}'
{
  "commit": "844fb6da4517f42a4eca631ab2e7cfaba1d8e2bd",
  "tree": "75b511bf3dae8cea5a37b08bb2e825ed486af1a4",
  "parents": [
    "46a2c11f72afe1c335f39228ab19201811b0f62b"
  ],
  "author": {
    "name": "Delilah Ashley Wu",
    "email": "delilahwu@microsoft.com",
    "time": "Fri Oct 09 19:51:46 2026 +1100"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Fri Oct 09 07:37:34 2026 -0700"
  },
  "message": "config: read global scope via config_sequence\n\nWhen both `$HOME/.gitconfig` and `$XDG_CONFIG_HOME/git/config` exist,\n`git config list --global` and `git config get --global` read the home\nconfiguration file but ignore the XDG file. Bug reporters expected these\n`--global` scoped commands to read both files [1][2], which would be\nconsistent with the documentation and the behaviour of the unscoped\nvariants. For example, `git config list` and `git config get` (without\n`--global`) read from both files (in addition to system-wide and\nrepository-specific entries). We should address this inconsistency by\nrespecting both files during `--global` read operations.\n\nThe implementation assumes that each configuration scope corresponds to\na single file. So during `--global` read operations, Git selects one\nfile path to pass to `git_config_from_file_with_options(file)`. Because\nthe global scope can come from more than one file, we should use another\nmethod to read the global configuration.\n\nSince `git config list --show-scope --show-origin` reads both the home\nand XDG files, there must be existing code that respects both locations,\nnamely `do_git_config_sequence()` which reads from all scopes. Introduce\nan `ignore_system` flag and modify `git_config_system()` to respect it.\nThis makes `config_options` the primary way to disable parts of the\nconfiguration sequence and allows callers of `do_git_config_sequence()`\nto ignore all but the global scope (i.e. ignore system, local, worktree,\nand cmdline). Reuse the function to read only the global scope when\n`--global` is specified. This was the suggested solution [3] in the\noriginal bug report [1].\n\nThe previous patch, \"t1300: test list with missing global config\",\nrecorded existing behaviour: when no global configuration file exists,\n`git config list` should succeed whereas `git config list --global`\nshould fail. Since the configuration sequence gracefully ignores missing\nglobal configuration files, track whether we successfully read at least\none of them and adjust the return code accordingly.\n\nKeep populating `opts-\u003esource.file` in `builtin/config.c` as the\ndestination for write operations. Read operations use the configuration\nsequence instead, which can be confusing. Add a comment to explain this\ndistinction.\n\nLastly, modify tests to check that both home and XDG configuration files\nare respected during `--global` read operations.\n\n[1] https://lore.kernel.org/git/CAFA9we-QLQRzJdGMMCPatmfrk1oHeiUu9msMRXXk1MLE5HRxBQ@mail.gmail.com/\n[2] https://lore.kernel.org/git/CAAdFe9yhBk-WecVzCTsjQ-4Z3AZAbpP+w+B076ouM3qX6d1WAg@mail.gmail.com/\n[3] https://lore.kernel.org/git/kl6ly1oze7wb.fsf@chooglen-macbookpro.roam.corp.google.com/\n\nReported-by: Jade Lovelace \u003clists@jade.fyi\u003e\nReported-by: Nils Fahldieck \u003cnils@fahldieck.de\u003e\nSuggested-by: Glen Choo \u003cglencbz@gmail.com\u003e\nHelped-by: Derrick Stolee \u003cstolee@gmail.com\u003e\nHelped-by: Johannes Schindelin \u003cjohannes.schindelin@gmx.de\u003e\nSigned-off-by: Delilah Ashley Wu \u003cdelilahwu@microsoft.com\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "0882899c3fbd2ababac99662f93078a6c70b90fd",
      "old_mode": 33188,
      "old_path": "builtin/config.c",
      "new_id": "a7468e86d3e5b76cea8dad4376d93088abc01c02",
      "new_mode": 33188,
      "new_path": "builtin/config.c"
    },
    {
      "type": "modify",
      "old_id": "cc3a43cde25a6c1a9f17e5de8959ec870a112f32",
      "old_mode": 33188,
      "old_path": "builtin/var.c",
      "new_id": "e999e72a2d563a0927cc95993f9dbf858ed010d6",
      "new_mode": 33188,
      "new_path": "builtin/var.c"
    },
    {
      "type": "modify",
      "old_id": "1bdd702e7a3969aeb0a1e05f52e55871e7ecd9ad",
      "old_mode": 33188,
      "old_path": "config.c",
      "new_id": "8c7e5232efa589ab7189b0b42ad0596df00e8674",
      "new_mode": 33188,
      "new_path": "config.c"
    },
    {
      "type": "modify",
      "old_id": "31fe3e29611e110f55cf62dec852e2178c58a0b3",
      "old_mode": 33188,
      "old_path": "config.h",
      "new_id": "448b8b5967d9077c1f79116ca25feb4ec1f047d9",
      "new_mode": 33188,
      "new_path": "config.h"
    },
    {
      "type": "modify",
      "old_id": "df8c14da0d8d001bf07a2778d55c482e8227e3ef",
      "old_mode": 33261,
      "old_path": "t/t1300-config.sh",
      "new_id": "15b1d713afd86bb55bb1482fdef27d2dd92e947a",
      "new_mode": 33261,
      "new_path": "t/t1300-config.sh"
    },
    {
      "type": "modify",
      "old_id": "40d3c42618c04f8b0e656af83fb2e303601dd7ff",
      "old_mode": 33261,
      "old_path": "t/t1306-xdg-files.sh",
      "new_id": "3a9a04bcc143fdf4cf385f8e1517c905ad62b88f",
      "new_mode": 33261,
      "new_path": "t/t1306-xdg-files.sh"
    }
  ]
}
