diff options
| author | Russell Belfer <rb@github.com> | 2013-01-08 13:39:15 -0800 |
|---|---|---|
| committer | Russell Belfer <rb@github.com> | 2013-01-15 09:49:32 -0800 |
| commit | 4b181037553601a0747ad39ccdd85ebd3b184055 (patch) | |
| tree | 1f4bb97ad79bd9f86337d372317e68f862fa1b3c /src/submodule.c | |
| parent | facc0650b12655c9637732bb992d1053cd946057 (diff) | |
| download | libgit2-4b181037553601a0747ad39ccdd85ebd3b184055.tar.gz | |
Minor iterator API cleanups
In preparation for further iterator changes, this cleans up a few
small things in the iterator API:
* removed the git_iterator_for_repo_index_range API
* made git_iterator_free not be inlined
* minor param name and test function name tweaks
Diffstat (limited to 'src/submodule.c')
| -rw-r--r-- | src/submodule.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/submodule.c b/src/submodule.c index a72326602..5283322f2 100644 --- a/src/submodule.c +++ b/src/submodule.c @@ -1130,10 +1130,12 @@ static int load_submodule_config_from_index( git_repository *repo, git_oid *gitmodules_oid) { int error; + git_index *index; git_iterator *i; const git_index_entry *entry; - if ((error = git_iterator_for_repo_index(&i, repo)) < 0) + if ((error = git_repository_index__weakptr(&index, repo)) < 0 || + (error = git_iterator_for_index(&i, index)) < 0) return error; error = git_iterator_current(i, &entry); |
