Re: [PATCH 06/13] submodule--helper: get remote names from any repository

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

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

> Glen Choo <chooglen@xxxxxxxxxx> writes:
>
>> +	struct ref_store *store = get_main_ref_store(repo);
>> +	int ignore_errno;
>> +	const char *refname = refs_resolve_ref_unsafe(store, "HEAD", 0, NULL,
>> +						      NULL, &ignore_errno);
>
> Given that 00/13 says this series is based on 715d08a9 (The eighth
> batch, 2022-02-25), which includes 03bdcfcc (Merge branch
> 'ab/no-errno-from-resolve-ref-unsafe', 2022-02-11), I think the
> above two lines are result of incorrect rebasing or something.
>
> Have you compiled after you rebased?

It turns out that I didn't.. I got complacent after doing this merge a
few times.

> It seems that after applying the band-aid below, t7406 seems to fail
> for two of its tests, too, but if this were not even compiled, that
> is to be expected X-<.

This is an even sillier mistake.. patch 12 accidentally includes some
tests from es/superproject-aware-submodules (probably a bad merge
conflict resolution).

>
>
>
>  builtin/submodule--helper.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git c/builtin/submodule--helper.c w/builtin/submodule--helper.c
> index ea88f39fb4..21401ad99e 100644
> --- c/builtin/submodule--helper.c
> +++ w/builtin/submodule--helper.c
> @@ -36,9 +36,7 @@ static char *repo_get_default_remote(struct repository *repo)
>  	char *dest = NULL, *ret;
>  	struct strbuf sb = STRBUF_INIT;
>  	struct ref_store *store = get_main_ref_store(repo);
> -	int ignore_errno;
> -	const char *refname = refs_resolve_ref_unsafe(store, "HEAD", 0, NULL,
> -						      NULL, &ignore_errno);
> +	const char *refname = refs_resolve_ref_unsafe(store, "HEAD", 0, NULL, NULL);
>  
>  	if (!refname)
>  		die(_("No such ref: %s"), "HEAD");



[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