Skip to content

Commit 60c2bf4

Browse files
author
Edward Thomson
committed
submodule: only examine idx & head given a config
1 parent 0fbff82 commit 60c2bf4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/submodule.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -512,12 +512,12 @@ int git_submodule__map(git_repository *repo, git_strmap *map)
512512
goto cleanup;
513513
}
514514
/* add back submodule information from index */
515-
if (idx) {
515+
if (mods && idx) {
516516
if ((error = submodules_from_index(map, idx, mods)) < 0)
517517
goto cleanup;
518518
}
519519
/* add submodule information from HEAD */
520-
if (head) {
520+
if (mods && head) {
521521
if ((error = submodules_from_head(map, head, mods)) < 0)
522522
goto cleanup;
523523
}

0 commit comments

Comments
 (0)