summaryrefslogtreecommitdiff
path: root/tests/diff/diffiter.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2016-03-10 17:21:02 +0100
committerPatrick Steinhardt <ps@pks.im>2016-03-11 14:20:15 +0100
commit13c371dc10f8b5696b5728c9824d155ef9ad2f81 (patch)
treefb366b5be101d0d206471a6155e62a76a336aac2 /tests/diff/diffiter.c
parent6ff8a7c4bed65f8fd7d7fbda662583499e68e2aa (diff)
downloadlibgit2-13c371dc10f8b5696b5728c9824d155ef9ad2f81.tar.gz
config_cache: check return value of `git_config__lookup_entry`
Callers of `git_config__cvar` already handle the case where the function returns an error due to a failed configuration variable lookup, but we are actually swallowing errors when calling `git_config__lookup_entry` inside of the function. Fix this by returning early when `git_config__lookup_entry` returns an error. As we call `git_config__lookup_entry` with `no_errors == false` which leads us to call `get_entry` with `GET_NO_MISSING` we will not return early when the lookup fails due to a missing entry. Like this we are still able to set the default value of the cvar and exit successfully.
Diffstat (limited to 'tests/diff/diffiter.c')
0 files changed, 0 insertions, 0 deletions