Re: [PATCH v3 04/13] submodule--helper run-update-procedure: remove --suboid
Glen Choo <chooglen@google.com> writes:
> Teach run-update-procedure to determine the oid of the submodule's HEAD
> instead of doing it in git-subomdule.sh.
Show 12 quoted lines
> @@ -3032,6 +3029,12 @@ static int module_create_branch(int argc, const char **argv, const char *prefix)
> /* NEEDSWORK: this is a temporary name until we delete update_submodule() */
> static int update_submodule2(struct update_data *update_data)
> {
> + if (update_data->just_cloned)
> + oidcpy(&update_data->suboid, null_oid());
> + else if (resolve_gitlink_ref(update_data->sm_path, "HEAD", &update_data->suboid))
> + die(_("Unable to find current revision in submodule path '%s'"),
> + update_data->displaypath);
> +
> if (!oideq(&update_data->oid, &update_data->suboid) || update_data->force)
> return do_run_update_procedure(update_data);