From d8289b9fb416cfe4f83eeb38fe324c077bada3e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?= Date: Fri, 9 Aug 2013 11:03:13 +0200 Subject: [PATCH] config: handle empty backends when iterating --- src/config.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/config.c b/src/config.c index 3881d73dd..061765ac0 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);