diff options
| author | Carlos Martín Nieto <cmn@dwim.me> | 2013-08-09 11:03:13 +0200 |
|---|---|---|
| committer | Carlos Martín Nieto <cmn@dwim.me> | 2013-08-12 11:40:57 +0200 |
| commit | d8289b9fb416cfe4f83eeb38fe324c077bada3e4 (patch) | |
| tree | e47ada4cfdb8eb1e8255889d74c05ad6ada33b13 /src/config.c | |
| parent | d8488b981c1410dd2de2f9fe99764bdae33ca607 (diff) | |
| download | libgit2-d8289b9fb416cfe4f83eeb38fe324c077bada3e4.tar.gz | |
config: handle empty backends when iterating
Diffstat (limited to 'src/config.c')
| -rw-r--r-- | src/config.c | 7 |
1 files changed, 6 insertions, 1 deletions
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); |
