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

From: Junio C Hamano <[email-masked]>
Date: Mon, 28 Feb 2022 18:46:36 -0800

Glen Choo <[email-masked]> 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 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-<.

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