threads / patch / 57553

patch, 5 partsRemove. duplicate include directives

Subject: [PATCH 0/5] Remove. duplicate include directives

## tl;dr

7 messages between Mar 13, 2022 and Mar 13, 2022. Diffs are folded; open one to read it.

replies: 6people: 2as markdown or json

Elia Pinto· Mar 13, 2022, 19:55 UTC · lore

This series of patches does not solve any particular problems but only eliminates unnecessary duplicate include directives from git sources

Elia Pinto (5):
  attr.c: delete duplicate include
  builtin/gc.c: delete duplicate include
  builtin/sparse-checkout.c: delete duplicate include
  builtin/stash.c: delete duplicate include
  t/helper/test-run-command.c: delete duplicate include
 attr.c                      | 1 -
 builtin/gc.c                | 1 -
 builtin/sparse-checkout.c   | 1 -
 builtin/stash.c             | 1 -
 t/helper/test-run-command.c | 1 -
 5 files changed, 5 deletions(-)
-- 
2.35.1
Elia Pinto· Mar 13, 2022, 19:55 UTC · re: Elia Pinto · lore

[PATCH 1/5] attr.c: delete duplicate include

dir.h is included more than once
Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 attr.c | 1 -
 1 file changed, 1 deletion(-)
Show changes to attr.c +0 −1
diff --git a/attr.c b/attr.c
index 79adaa50ea..1626cade8b 100644
--- a/attr.c
+++ b/attr.c
@@ -14,7 +14,6 @@
 #include "utf8.h"
 #include "quote.h"
 #include "thread-utils.h"
-#include "dir.h"
 
 const char git_attr__true[] = "(builtin)true";
 const char git_attr__false[] = "\0(builtin)false";
-- 
2.35.1
Elia Pinto· Mar 13, 2022, 19:55 UTC · re: Elia Pinto · lore

[PATCH 2/5] builtin/gc.c: delete duplicate include

object-store.h is included more than once.
Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 builtin/gc.c | 1 -
 1 file changed, 1 deletion(-)
Show changes to builtin/gc.c +0 −1
diff --git a/builtin/gc.c b/builtin/gc.c
index ffaf0daf5d..b335cffa33 100644
--- a/builtin/gc.c
+++ b/builtin/gc.c
@@ -30,7 +30,6 @@
 #include "promisor-remote.h"
 #include "refs.h"
 #include "remote.h"
-#include "object-store.h"
 #include "exec-cmd.h"
 #include "hook.h"
 
-- 
2.35.1
Elia Pinto· Mar 13, 2022, 19:55 UTC · re: Elia Pinto · lore

[PATCH 3/5] builtin/sparse-checkout.c: delete duplicate include

cache.h is included more than once.
Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 builtin/sparse-checkout.c | 1 -
 1 file changed, 1 deletion(-)
Show changes to builtin/sparse-checkout.c +0 −1
diff --git a/builtin/sparse-checkout.c b/builtin/sparse-checkout.c
index 5518ed47f6..d88d141076 100644
--- a/builtin/sparse-checkout.c
+++ b/builtin/sparse-checkout.c
@@ -8,7 +8,6 @@
 #include "run-command.h"
 #include "strbuf.h"
 #include "string-list.h"
-#include "cache.h"
 #include "cache-tree.h"
 #include "lockfile.h"
 #include "resolve-undo.h"
-- 
2.35.1
Elia Pinto· Mar 13, 2022, 19:55 UTC · re: Elia Pinto · lore

[PATCH 4/5] builtin/stash.c: delete duplicate include

 entry.h is included more than once.
Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 builtin/stash.c | 1 -
 1 file changed, 1 deletion(-)
Show changes to builtin/stash.c +0 −1
diff --git a/builtin/stash.c b/builtin/stash.c
index 3e8af210fd..548048f444 100644
--- a/builtin/stash.c
+++ b/builtin/stash.c
@@ -16,7 +16,6 @@
 #include "log-tree.h"
 #include "diffcore.h"
 #include "exec-cmd.h"
-#include "entry.h"
 
 #define INCLUDE_ALL_FILES 2
 
-- 
2.35.1
Elia Pinto· Mar 13, 2022, 19:55 UTC · re: Elia Pinto · lore

[PATCH 5/5] t/helper/test-run-command.c: delete duplicate include

parse-options.h is included more than once.
Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 t/helper/test-run-command.c | 1 -
 1 file changed, 1 deletion(-)
Show changes to t/helper/test-run-command.c +0 −1
diff --git a/t/helper/test-run-command.c b/t/helper/test-run-command.c
index 8f370cd89f..1b35a143c1 100644
--- a/t/helper/test-run-command.c
+++ b/t/helper/test-run-command.c
@@ -19,7 +19,6 @@
 #include "thread-utils.h"
 #include "wildmatch.h"
 #include "gettext.h"
-#include "parse-options.h"
 
 static int number_callbacks;
 static int parallel_next(struct child_process *cp,
-- 
2.35.1
Junio C Hamano· Mar 13, 2022, 22:22 UTC · re: Elia Pinto · lore

Re: [PATCH 0/5] Remove. duplicate include directives

Elia Pinto <gitter.spiros@gmail.com> writes:
Show 10 quoted lines
> This series of patches does not solve any particular problems but
> only eliminates unnecessary duplicate include directives
> from git sources
>
> Elia Pinto (5):
>   attr.c: delete duplicate include
>   builtin/gc.c: delete duplicate include
>   builtin/sparse-checkout.c: delete duplicate include
>   builtin/stash.c: delete duplicate include
>   t/helper/test-run-command.c: delete duplicate include
Thanks.
It matches the output from the pipeline:
$ git grep '^#include' \*.c |
  sort | uniq -c | sort -n | sed -e '/^ *1 /d'

← back to recent threads