Web lists-archives.com

Re: [PATCH][Outreachy] remove all the inclusions of git-compat-util.h in header files




On 10/8/2018 1:05 PM, Ananya Krishna Maram wrote:
Hi All,
Hello, Ananya! Welcome.

I was searching through #leftovers and found this.
https://public-inbox.org/git/CABPp-BGVVXcbZX44er6TO-PUsfEN_6GNYJ1U5cuoN9deaA48OQ@xxxxxxxxxxxxxx/

This patch address the task discussed in the above link.
The discussion above seems to not be intended for your commit message, but it does show up when I run `git am` and provide your email as input. The typical way to avoid this is to place all commentary below the "---" that signifies the commit message is over.
From: Ananya Krishan Maram <ananyakittu1997@xxxxxxxxx>

skip the #include of git-compat-util.h since all .c files include it.

Signed-off-by: Ananya Krishna Maram <ananyakittu1997@xxxxxxxxx>
---
  advice.h             | 1 -
  commit-graph.h       | 1 -
  hash.h               | 1 -
  pkt-line.h           | 1 -
  t/helper/test-tool.h | 1 -
  5 files changed, 5 deletions(-)

diff --git a/advice.h b/advice.h
index ab24df0fd..09148baa6 100644
--- a/advice.h
+++ b/advice.h
@@ -1,7 +1,6 @@
  #ifndef ADVICE_H
  #define ADVICE_H
-#include "git-compat-util.h" extern int advice_push_update_rejected;
  extern int advice_push_non_ff_current;
diff --git a/commit-graph.h b/commit-graph.h
index b05047676..0e93c2bed 100644
--- a/commit-graph.h
+++ b/commit-graph.h
@@ -1,7 +1,6 @@
  #ifndef COMMIT_GRAPH_H
  #define COMMIT_GRAPH_H
-#include "git-compat-util.h"
  #include "repository.h"
  #include "string-list.h"
  #include "cache.h"
diff --git a/hash.h b/hash.h
index 7c8238bc2..9a4334c5d 100644
--- a/hash.h
+++ b/hash.h
@@ -1,7 +1,6 @@
  #ifndef HASH_H
  #define HASH_H
-#include "git-compat-util.h" #if defined(SHA1_PPC)
  #include "ppc/sha1.h"
diff --git a/pkt-line.h b/pkt-line.h
index 5b28d4347..fdd316494 100644
--- a/pkt-line.h
+++ b/pkt-line.h
@@ -1,7 +1,6 @@
  #ifndef PKTLINE_H
  #define PKTLINE_H
-#include "git-compat-util.h"
  #include "strbuf.h"
/*
diff --git a/t/helper/test-tool.h b/t/helper/test-tool.h
index e07495727..24e0a1589 100644
--- a/t/helper/test-tool.h
+++ b/t/helper/test-tool.h
@@ -1,7 +1,6 @@
  #ifndef __TEST_TOOL_H__
  #define __TEST_TOOL_H__
-#include "git-compat-util.h" int cmd__chmtime(int argc, const char **argv);
  int cmd__config(int argc, const char **argv);
I applied these changes locally and confirmed the code compiles, so all .c files including these _do_ include git-compat-util.h properly.

Thanks,
-Stolee