config: handle empty backends when iterating

This commit is contained in:
Carlos Martín Nieto 2013-08-09 11:03:13 +02:00
parent d8488b981c
commit d8289b9fb4

View File

@ -375,7 +375,12 @@ static int all_iter_next(git_config_entry **entry, git_config_iterator *_iter)
if (error < 0) if (error < 0)
return error; 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); } while(1);