-
Notifications
You must be signed in to change notification settings - Fork 142
Remove duplicate forward declaration of struct repository #1879
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove duplicate forward declaration of struct repository #1879
Conversation
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>
/preview |
Preview email sent as pull.1879.git.1741705066767.gitgitgadget@gmail.com |
/submit |
Submitted as pull.1879.git.1741705175922.gitgitgadget@gmail.com To fetch this version into
To fetch this version to local tag
|
On the Git mailing list, Junio C Hamano wrote (reply to this): "Abhijeetsingh Meena via GitGitGadget" <gitgitgadget@gmail.com>
writes:
> 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.
> 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 |
This patch series was integrated into seen via git@94dfd81. |
This branch is now known as |
This patch series was integrated into seen via git@f6da788. |
There was a status update in the "New Topics" section about the branch Code cleanup. Will merge to 'next'. source: <pull.1879.git.1741705175922.gitgitgadget@gmail.com> |
This patch series was integrated into seen via git@48e4fa7. |
This patch series was integrated into seen via git@dd46f94. |
There was a status update in the "Cooking" section about the branch Code cleanup. Will merge to 'next'. source: <pull.1879.git.1741705175922.gitgitgadget@gmail.com> |
This patch series was integrated into seen via git@fcc0a1e. |
This patch series was integrated into seen via git@e06c63b. |
This patch series was integrated into seen via git@898b000. |
This patch series was integrated into seen via git@2278c08. |
This patch series was integrated into seen via git@03e8ba1. |
This patch series was integrated into next via git@9075454. |
This patch series was integrated into seen via git@3e03cdb. |
There was a status update in the "Cooking" section about the branch Code cleanup. Will merge to 'master'. source: <pull.1879.git.1741705175922.gitgitgadget@gmail.com> |
This patch series was integrated into seen via git@1cd5a5b. |
There was a status update in the "Cooking" section about the branch Code cleanup. Will merge to 'master'. source: <pull.1879.git.1741705175922.gitgitgadget@gmail.com> |
This patch series was integrated into seen via git@055cbd4. |
This patch series was integrated into seen via git@77f9b97. |
There was a status update in the "Cooking" section about the branch Code cleanup. Will merge to 'master'. source: <pull.1879.git.1741705175922.gitgitgadget@gmail.com> |
This patch series was integrated into seen via git@e91937e. |
This patch series was integrated into seen via git@f3db666. |
This patch series was integrated into master via git@f3db666. |
This patch series was integrated into next via git@f3db666. |
Closed via f3db666. |
Summary
While exploring how Git searches for
.gitignore
files and manages ignored files, I came acrossdir.h
. While reading through the file, I noticed thatstruct repository;
was forward-declared twice. This duplication appears unnecessary, and removing the second declaration compiles cleanly.