Subject: Re: [PATCH 4/6] submodule--helper: improve logic for fallback remote name

From: Junio C Hamano <[email-masked]>
Date: Tue, 17 Jun 2025 06:30:56 -0700

Jacob Keller <[email-masked]> writes:

> diff --git a/remote.h b/remote.h
> index 7e4943ae3a70ecefa3332d211084762ca30b59b6..ef0de4aa64e9ccd32cc2eea076c00386dcba1161 100644
> --- a/remote.h
> +++ b/remote.h
> @@ -338,6 +338,8 @@ const char *remote_for_branch(struct branch *branch, int *explicit);
>  const char *pushremote_for_branch(struct branch *branch, int *explicit);
>  char *remote_ref_for_branch(struct branch *branch, int for_push);
>  
> +const char *repo_default_remote(struct repository *repo);
> +

This breaks "make hdr-check" because nobody up to this point
mentions "struct repository".

It seems doing an opaque forward declaration is in vogue at least in
this file?

 remote.h | 1 +
 1 file changed, 1 insertion(+)

diff --git c/remote.h w/remote.h
index ef0de4aa64..86020ae2d3 100644
--- c/remote.h
+++ w/remote.h
@@ -9,6 +9,7 @@
 
 struct option;
 struct transport_ls_refs_options;
+struct repository;
 
 /**
  * The API gives access to the configuration related to remotes. It handles