summaryrefslogtreecommitdiff
path: root/src/submodule.c
diff options
context:
space:
mode:
authorVicent Martí <vicent@github.com>2013-03-12 09:23:53 -0700
committerVicent Martí <vicent@github.com>2013-03-12 09:23:53 -0700
commit1ac10aae1da23f4a626d8eecd636402572785426 (patch)
treea315a5ed203ed12807b814b65e825923c536f38b /src/submodule.c
parentb70bf922a1de35722904930c42467e95c889562f (diff)
parent62beacd300a6d3c62943723928f45ef852485e62 (diff)
downloadlibgit2-1ac10aae1da23f4a626d8eecd636402572785426.tar.gz
Merge pull request #1408 from arrbee/refactor-iterators
Refactor iterators
Diffstat (limited to 'src/submodule.c')
-rw-r--r--src/submodule.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/submodule.c b/src/submodule.c
index 359306498..c02061376 100644
--- a/src/submodule.c
+++ b/src/submodule.c
@@ -1135,10 +1135,10 @@ static int load_submodule_config_from_index(
const git_index_entry *entry;
if ((error = git_repository_index__weakptr(&index, repo)) < 0 ||
- (error = git_iterator_for_index(&i, index)) < 0)
+ (error = git_iterator_for_index(&i, index, 0, NULL, NULL)) < 0)
return error;
- error = git_iterator_current(i, &entry);
+ error = git_iterator_current(&entry, i);
while (!error && entry != NULL) {
@@ -1154,7 +1154,7 @@ static int load_submodule_config_from_index(
git_oid_cpy(gitmodules_oid, &entry->oid);
}
- error = git_iterator_advance(i, &entry);
+ error = git_iterator_advance(&entry, i);
}
git_iterator_free(i);
@@ -1173,12 +1173,12 @@ static int load_submodule_config_from_head(
if ((error = git_repository_head_tree(&head, repo)) < 0)
return error;
- if ((error = git_iterator_for_tree(&i, head)) < 0) {
+ if ((error = git_iterator_for_tree(&i, head, 0, NULL, NULL)) < 0) {
git_tree_free(head);
return error;
}
- error = git_iterator_current(i, &entry);
+ error = git_iterator_current(&entry, i);
while (!error && entry != NULL) {
@@ -1195,7 +1195,7 @@ static int load_submodule_config_from_head(
git_oid_cpy(gitmodules_oid, &entry->oid);
}
- error = git_iterator_advance(i, &entry);
+ error = git_iterator_advance(&entry, i);
}
git_iterator_free(i);