Commit eea0169
config: test home and xdg files in
The `git config list --global` output includes `$HOME/.gitconfig` (home
config), but ignores `$XDG_CONFIG_HOME/git/config` (XDG config). It
should include both files.
Modify tests to check the following and expect a failure:
- `git config list --global` should include contents from both the
home and XDG config locations (assuming they are readable), not
just the former.
- `--show-origin` should print correct paths to both config files,
assuming they exist.
Also, add tests to ensure subsequent patches do not introduce
regressions to `git config list`. Specifically, check that:
- The home config should take precedence over the XDG config.
- Without `--global`, it should not bail on unreadable/non-existent
global config files.
- With `--global`, it should bail when both `$HOME/.gitconfig` and
`$XDG_CONFIG_HOME/git/config` are unreadable. It should not bail if
at least one of them is readable.
The next patch, config: read global scope via config_sequence, will
implement a fix to include both config files when `--global` is
specified.
Reported-by: Jade Lovelace <[email protected]>
Helped-by: Derrick Stolee <[email protected]>
Signed-off-by: Delilah Ashley Wu <[email protected]>
Reviewed-by: Johannes Schindelin <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>list --global
1 parent dfd1063 commit eea0169
2 files changed
+68
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2362 | 2362 | | |
2363 | 2363 | | |
2364 | 2364 | | |
| 2365 | + | |
| 2366 | + | |
| 2367 | + | |
| 2368 | + | |
| 2369 | + | |
| 2370 | + | |
| 2371 | + | |
| 2372 | + | |
| 2373 | + | |
| 2374 | + | |
| 2375 | + | |
| 2376 | + | |
| 2377 | + | |
| 2378 | + | |
| 2379 | + | |
| 2380 | + | |
| 2381 | + | |
| 2382 | + | |
| 2383 | + | |
| 2384 | + | |
| 2385 | + | |
| 2386 | + | |
| 2387 | + | |
| 2388 | + | |
| 2389 | + | |
| 2390 | + | |
| 2391 | + | |
| 2392 | + | |
| 2393 | + | |
| 2394 | + | |
| 2395 | + | |
| 2396 | + | |
| 2397 | + | |
| 2398 | + | |
| 2399 | + | |
| 2400 | + | |
| 2401 | + | |
| 2402 | + | |
| 2403 | + | |
| 2404 | + | |
| 2405 | + | |
| 2406 | + | |
| 2407 | + | |
| 2408 | + | |
| 2409 | + | |
| 2410 | + | |
| 2411 | + | |
| 2412 | + | |
| 2413 | + | |
| 2414 | + | |
| 2415 | + | |
| 2416 | + | |
| 2417 | + | |
| 2418 | + | |
| 2419 | + | |
| 2420 | + | |
| 2421 | + | |
| 2422 | + | |
| 2423 | + | |
| 2424 | + | |
| 2425 | + | |
| 2426 | + | |
| 2427 | + | |
| 2428 | + | |
| 2429 | + | |
2365 | 2430 | | |
2366 | 2431 | | |
2367 | 2432 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
| 72 | + | |
72 | 73 | | |
73 | | - | |
| 74 | + | |
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
| |||
0 commit comments