Name |
Last commit
|
Last update |
---|---|---|
.. | ||
add.c | ||
backend.c | ||
conditionals.c | ||
config_helpers.c | ||
config_helpers.h | ||
configlevel.c | ||
global.c | ||
include.c | ||
multivar.c | ||
new.c | ||
read.c | ||
readonly.c | ||
rename.c | ||
snapshot.c | ||
stress.c | ||
validkeyname.c | ||
write.c |
When we try to add a configuration file with `git_config_add_file_ondisk`, we treat nonexisting files as empty. We do this by performing a stat call, ignoring ENOENT errors. This works just fine in case the file or any of its parents simply does not exist, but there is also the case where any of the parent directories is not a directory, but a file. So e.g. trying to add a configuration file "/dev/null/.gitconfig" will fail, as `errno` will be ENOTDIR instead of ENOENT. Catch ENOTDIR in addition to ENOENT to fix the issue. Add a test that verifies we are able to add configuration files with such an invalid path file just fine.
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
add.c | Loading commit data... | |
backend.c | Loading commit data... | |
conditionals.c | Loading commit data... | |
config_helpers.c | Loading commit data... | |
config_helpers.h | Loading commit data... | |
configlevel.c | Loading commit data... | |
global.c | Loading commit data... | |
include.c | Loading commit data... | |
multivar.c | Loading commit data... | |
new.c | Loading commit data... | |
read.c | Loading commit data... | |
readonly.c | Loading commit data... | |
rename.c | Loading commit data... | |
snapshot.c | Loading commit data... | |
stress.c | Loading commit data... | |
validkeyname.c | Loading commit data... | |
write.c | Loading commit data... |