config: handle empty backends when iterating
diff --git a/src/config.c b/src/config.c
index 3881d73..061765a 100644
--- a/src/config.c
+++ b/src/config.c
@@ -375,7 +375,12 @@ static int all_iter_next(git_config_entry **entry, git_config_iterator *_iter)
if (error < 0)
return error;
- return iter->current->next(entry, iter->current);
+ error = iter->current->next(entry, iter->current);
+ /* If this backend is empty, then keep going */
+ if (error == GIT_ITEROVER)
+ continue;
+
+ return error;
} while(1);