Unverified Commit 3f4b91b2 by tagesuhu Committed by GitHub

submodule: Do not try to update a missing submodule

If a submodule has been configured but not yet added, do not try to update it.

Issue #6433: git_submodule_update fails to update configured but missing submodule
parent b57b7628
......@@ -1338,7 +1338,11 @@ int git_submodule_update(git_submodule *sm, int init, git_submodule_update_optio
/* Get the status of the submodule to determine if it is already initialized */
if ((error = git_submodule_status(&submodule_status, sm->repo, sm->name, GIT_SUBMODULE_IGNORE_UNSPECIFIED)) < 0)
goto done;
/* If the submodule is configured but hasn't been added, skip it */
if (submodule_status == GIT_SUBMODULE_STATUS_IN_CONFIG)
goto done;
/*
* If submodule work dir is not already initialized, check to see
* what we need to do (initialize, clone, return error...)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment