mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-30 22:24:56 +00:00
A little git_config_get_multivar code cleanup
This commit is contained in:
parent
7b5c0d1846
commit
e4fda954d6
16
src/config.c
16
src/config.c
@ -534,8 +534,7 @@ int git_config_get_multivar(
|
|||||||
{
|
{
|
||||||
file_internal *internal;
|
file_internal *internal;
|
||||||
git_config_backend *file;
|
git_config_backend *file;
|
||||||
int ret = GIT_ENOTFOUND;
|
int ret = GIT_ENOTFOUND, err;
|
||||||
int err;
|
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -548,15 +547,10 @@ int git_config_get_multivar(
|
|||||||
continue;
|
continue;
|
||||||
file = internal->file;
|
file = internal->file;
|
||||||
|
|
||||||
err = file->get_multivar(file, name, regexp, cb, payload);
|
if (!(err = file->get_multivar(file, name, regexp, cb, payload)))
|
||||||
switch (err) {
|
ret = 0;
|
||||||
case GIT_OK:
|
else if (err != GIT_ENOTFOUND)
|
||||||
ret = GIT_OK;
|
return err;
|
||||||
case GIT_ENOTFOUND:
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
return err;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (ret == GIT_ENOTFOUND) ? config_error_notfound(name) : 0;
|
return (ret == GIT_ENOTFOUND) ? config_error_notfound(name) : 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user