summaryrefslogtreecommitdiff
path: root/src/iterator.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/iterator.c')
-rw-r--r--src/iterator.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/iterator.c b/src/iterator.c
index b15bcedd8..805a3c987 100644
--- a/src/iterator.c
+++ b/src/iterator.c
@@ -1150,11 +1150,13 @@ static int workdir_iterator__update_entry(workdir_iterator *wi)
return 0;
/* detect submodules */
-
error = git_submodule_lookup(NULL, wi->base.repo, wi->entry.path);
if (error == GIT_ENOTFOUND)
giterr_clear();
+ if (error == GIT_EEXISTS) /* if contains .git, treat as untracked submod */
+ error = 0;
+
/* if submodule, mark as GITLINK and remove trailing slash */
if (!error) {
size_t len = strlen(wi->entry.path);