You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The behaviour for `git config list` is:
A. Without `--global`, it should not bail on unreadable/non-existent
global config files.
B. With `--global`, it should bail when both `$HOME/.gitconfig` and
`$XDG_CONFIG_HOME/git/config` are unreadable. It should not bail
when one or more of them is readable.
The previous patch introduced a regression in scenario B: running
`git config list --global` would not fail when both global config files
are unreadable. For example,
`GIT_CONFIG_GLOBAL=does-not-exist git config list --global` would exit
with status code 0.
Assuming that `config_source->scope == CONFIG_SCOPE_GLOBAL` iff the
`--global` argument is specified, use this to determine whether to bail.
When reading only the global scope and both config files are unreadable,
then adjust the return code to be non-zero.
Note: The logic to determine the exit code does not actually sum the
return codes of the underlying operations. Instead, it uses a single
decrement operation. If this is undesirable, we can change it to sum
the return codes of the underlying operations instead.
Signed-off-by: Delilah Ashley Wu <[email protected]>
0 commit comments