git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] dir.h: remove duplicate forward declaration of struct repository

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 11, 2025, 22:13 UTC
Message-ID
<xmqqecz32p3j.fsf@gitster.g>
In-Reply-To
<pull.1879.git.1741705175922.gitgitgadget@gmail.com>

"Abhijeetsingh Meena via GitGitGadget" <gitgitgadget@gmail.com> writes:

Show 11 quoted lines
> From: Abhijeetsingh Meena <abhijeet040403@gmail.com>
>
> The `struct repository;` forward declaration appears twice in `dir.h`:
> once at line 10 and again at line 46. This duplication is unnecessary
> and likely unintentional.
>
> Removing the second declaration has no impact on compilation, as verified
> by a clean build.
>
> Signed-off-by: Abhijeetsingh Meena <abhijeet040403@gmail.com>
> ---
Thanks.  Will apply.
Show 17 quoted lines
>  dir.h | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/dir.h b/dir.h
> index a3a2f00f5d9..e659c47ad77 100644
> --- a/dir.h
> +++ b/dir.h
> @@ -43,7 +43,6 @@ struct repository;
>   *
>   */
>  
> -struct repository;
>  
>  struct dir_entry {
>  	unsigned int len;
>
> base-commit: ef8ce8f3d4344fd3af049c17eeba5cd20d98b69f
Previous: Abhijeetsingh Meena via GitGitGadget
Message 2 of 2 in “dir.h: remove duplicate forward declaration of struct repository”
  1. dir.h: remove duplicate forward declaration of struct repositoryAbhijeetsingh Meena via GitGitGadget, Mar 11, 2025
  2. Junio C HamanoMar 11, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.