From 96728b223685410a252a253bd49f8ecb77f34cb1 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Tue, 18 Jun 2019 11:54:09 -0400 Subject: [PATCH 1/2] verify-tag: drop signal.h include There's no reason verify-tag.c needs to include signal.h. It's already in git-compat-util.h, which we properly include as the first header. And there doesn't seem to be a particular reason for this include; it's just an artifact from the file creation in 2ae68fcb78 (Make verify-tag a builtin., 2007-07-27). Likewise verify-commit.c has the same issue, probably because it was created using verify-tag as a template in d07b00b7f3 (verify-commit: scriptable commit signature verification, 2014-06-23). These includes are probably just redundant, and not hurting anything by circumventing the order that git-compat-util.h tries to impose, since we'll always have loaded git-compat-util by the time we get to these. So this is just a cleanup, and shouldn't fix or break any platforms. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- builtin/verify-commit.c | 1 - builtin/verify-tag.c | 1 - 2 files changed, 2 deletions(-) diff --git a/builtin/verify-commit.c b/builtin/verify-commit.c index 7772c07ed7..4e93914e59 100644 --- a/builtin/verify-commit.c +++ b/builtin/verify-commit.c @@ -12,7 +12,6 @@ #include "repository.h" #include "commit.h" #include "run-command.h" -#include #include "parse-options.h" #include "gpg-interface.h" diff --git a/builtin/verify-tag.c b/builtin/verify-tag.c index 6fa04b751a..f45136a06b 100644 --- a/builtin/verify-tag.c +++ b/builtin/verify-tag.c @@ -10,7 +10,6 @@ #include "builtin.h" #include "tag.h" #include "run-command.h" -#include #include "parse-options.h" #include "gpg-interface.h" #include "ref-filter.h" From 7a06fb038ccfccb0e2a5991341b43f2586627c71 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Tue, 18 Jun 2019 11:54:19 -0400 Subject: [PATCH 2/2] wt-status.h: drop stdio.h include We started including stdio.h to pick up the declaration of "FILE" in f26a001226 (Enable wt-status output to a given FILE pointer., 2007-09-17). But there's no need, since headers can assume that git-compat-util.h has been included, which covers stdio. This should just be redundant, and not hurting anything (like pulling in includes out of order) because C files are supposed to always include git-compat-util.h first. But it's worth cleaning up to model good behavior. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- wt-status.h | 1 - 1 file changed, 1 deletion(-) diff --git a/wt-status.h b/wt-status.h index 64f1ddc9fd..8849768e92 100644 --- a/wt-status.h +++ b/wt-status.h @@ -1,7 +1,6 @@ #ifndef STATUS_H #define STATUS_H -#include #include "string-list.h" #include "color.h" #include "pathspec.h"