diff options
author | Edward Thomson <ethomson@github.com> | 2017-01-22 00:58:41 +0000 |
---|---|---|
committer | Edward Thomson <ethomson@github.com> | 2017-01-23 22:29:57 +0000 |
commit | 60c2bf47e40d86f1fcf9b9b928666ed2b06d0e4d (patch) | |
tree | c369fb81197e0d5d1ec644a31a9111563eb97434 /src/submodule.c | |
parent | 0fbff82b579ae4bb764a293e9f4ef543c549ba2b (diff) | |
download | libgit2-60c2bf47e40d86f1fcf9b9b928666ed2b06d0e4d.tar.gz |
submodule: only examine idx & head given a config
Diffstat (limited to 'src/submodule.c')
-rw-r--r-- | src/submodule.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/submodule.c b/src/submodule.c index 9e007df2b..fc3dcb406 100644 --- a/src/submodule.c +++ b/src/submodule.c @@ -512,12 +512,12 @@ int git_submodule__map(git_repository *repo, git_strmap *map) goto cleanup; } /* add back submodule information from index */ - if (idx) { + if (mods && idx) { if ((error = submodules_from_index(map, idx, mods)) < 0) goto cleanup; } /* add submodule information from HEAD */ - if (head) { + if (mods && head) { if ((error = submodules_from_head(map, head, mods)) < 0) goto cleanup; } |