Re: [PATCH v3 04/13] submodule--helper run-update-procedure: remove --suboid

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Glen Choo <chooglen@xxxxxxxxxx> writes:

> Teach run-update-procedure to determine the oid of the submodule's HEAD
> instead of doing it in git-subomdule.sh.

subomdule -> submodule.

> @@ -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);

Makes sense.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux