summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/submodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/submodule.c b/src/submodule.c
index 78ce7c768..1efc947c6 100644
--- a/src/submodule.c
+++ b/src/submodule.c
@@ -2170,7 +2170,7 @@ static int lookup_default_remote(git_remote **remote, git_repository *repo)
int error = lookup_head_remote(remote, repo);
/* if that failed, use 'origin' instead */
- if (error == GIT_ENOTFOUND)
+ if (error == GIT_ENOTFOUND || error == GIT_EUNBORNBRANCH)
error = git_remote_lookup(remote, repo, "origin");
if (error == GIT_ENOTFOUND)