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

[PATCH v2 1/5] verify-tag: drop signal.h include

From
Carlo Marcelo Arenas Belón <carenas@gmail.com>
Date
Jul 28, 2019, 20:07 UTC
Message-ID
<20190728200724.35630-2-carenas@gmail.com>
In-Reply-To
<20190728200724.35630-1-carenas@gmail.com>
From: Jeff King <peff@peff.net>

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 <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 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 <signal.h>
 #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 <signal.h>
 #include "parse-options.h"
 #include "gpg-interface.h"
 #include "ref-filter.h"
-- 
2.22.0
Previous: Carlo Marcelo Arenas BelónNext: Carlo Marcelo Arenas Belón
Message 11 of 17 in “xdiff: avoid accidental redefinition of LFS feature in OpenIndiana”
  1. xdiff: avoid accidental redefinition of LFS feature in OpenIndianaCarlo Marcelo Arenas Belón, Jun 18, 2019
  2. Johannes SchindelinJun 18, 2019
  3. 0/2 a few more redundant system include cleanupsJeff King, Jun 18, 2019
  4. 1/2 verify-tag: drop signal.h includeJeff King, Jun 18, 2019
  5. 2/2 wt-status.h: drop stdio.h includeJeff King, Jun 18, 2019
  6. Carlo ArenasJun 19, 2019
  7. Jeff KingJun 19, 2019
  8. Junio C HamanoJul 3, 2019
  9. Carlo ArenasJul 4, 2019
  10. 0/5 system header cleanupCarlo Marcelo Arenas Belón, Jul 28, 2019
  11. 1/5 verify-tag: drop signal.h includeCarlo Marcelo Arenas Belón, Jul 28, 2019
  12. 2/5 wt-status.h: drop stdio.h includeCarlo Marcelo Arenas Belón, Jul 28, 2019
  13. 3/5 xdiff: drop system includes in xutils.cCarlo Marcelo Arenas Belón, Jul 28, 2019
  14. 5/5 xdiff: remove duplicate headers from xpatience.cCarlo Marcelo Arenas Belón, Jul 28, 2019
  15. 4/5 xdiff: remove duplicate headers from xhistogram.cCarlo Marcelo Arenas Belón, Jul 28, 2019
  16. Jeff KingJul 28, 2019
  17. Junio C HamanoJul 29, 2019

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.