]> git.ipfire.org Git - thirdparty/git.git/commitdiff
environment: move comment_line_char from cache.h
authorElijah Newren <newren@gmail.com>
Tue, 21 Mar 2023 06:25:57 +0000 (06:25 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 21 Mar 2023 17:56:52 +0000 (10:56 -0700)
This is one step towards making strbuf.c not depend upon cache.h.
Additional steps will follow in subsequent commits.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 files changed:
add-patch.c
builtin/branch.c
builtin/commit.c
builtin/merge.c
builtin/tag.c
cache.h
commit.c
environment.h
fmt-merge-msg.c
sequencer.c
strbuf.c
trailer.c
wt-status.c

index 4c803a5f4dbafd49299c1bd4b8387ba8360e1752..e59830291a649a2331cf89bd45fc8438ac5d749a 100644 (file)
@@ -1,6 +1,7 @@
 #include "cache.h"
 #include "add-interactive.h"
 #include "alloc.h"
+#include "environment.h"
 #include "gettext.h"
 #include "strbuf.h"
 #include "run-command.h"
index a67a8334d5cec22124d76161c408e50a6be25c7d..56dbee97d20db5b146b12a6f6a0b28dedf0755e0 100644 (file)
@@ -8,6 +8,7 @@
 #include "cache.h"
 #include "config.h"
 #include "color.h"
+#include "environment.h"
 #include "refs.h"
 #include "commit.h"
 #include "builtin.h"
index 25575435ad7f036ecc5529b5a2bd73d00beadb6a..42bf20f589cdacd76541892c9adad2f322e17914 100644 (file)
@@ -12,6 +12,7 @@
 #include "cache-tree.h"
 #include "color.h"
 #include "dir.h"
+#include "environment.h"
 #include "builtin.h"
 #include "diff.h"
 #include "diffcore.h"
index a90ae5d2ddc21999001f336b7c61b359484e880e..2c9da4b23d1a667b8fa7bb52a187ecb65f9b5397 100644 (file)
@@ -10,6 +10,7 @@
 #include "cache.h"
 #include "alloc.h"
 #include "config.h"
+#include "environment.h"
 #include "gettext.h"
 #include "hex.h"
 #include "parse-options.h"
index c2ea89c4754d9d215ae5ca68357126ac20067b50..0611b3bd600199f8d496c90d736a10362336bfa5 100644 (file)
@@ -9,6 +9,7 @@
 #include "cache.h"
 #include "config.h"
 #include "builtin.h"
+#include "environment.h"
 #include "gettext.h"
 #include "hex.h"
 #include "refs.h"
diff --git a/cache.h b/cache.h
index 5a736a2b7e714afbc28cc398e6b088c9f0a52293..e122de6f930f9ce0cb7e2e93c292a3b1662b30a3 100644 (file)
--- a/cache.h
+++ b/cache.h
@@ -959,13 +959,6 @@ extern int sparse_expect_files_outside_of_patterns;
  */
 int use_optional_locks(void);
 
-/*
- * The character that begins a commented line in user-editable file
- * that is subject to stripspace.
- */
-extern char comment_line_char;
-extern int auto_comment_line_char;
-
 enum log_refs_config {
        LOG_REFS_UNSET = -1,
        LOG_REFS_NONE = 0,
index 3fdfb325117db383f6cdc8ccb188670dcba6b417..f88fc5e1a2cd8c8230beebdc10486f8ee4bca51d 100644 (file)
--- a/commit.c
+++ b/commit.c
@@ -2,6 +2,7 @@
 #include "tag.h"
 #include "commit.h"
 #include "commit-graph.h"
+#include "environment.h"
 #include "gettext.h"
 #include "hex.h"
 #include "repository.h"
index d438b5c8f3a62226a3a1cc32bb9ab9d9def25a4e..a26931556af11402ad9478023d2fc3ce216edeb9 100644 (file)
@@ -3,6 +3,13 @@
 
 #include "strvec.h"
 
+/*
+ * The character that begins a commented line in user-editable file
+ * that is subject to stripspace.
+ */
+extern char comment_line_char;
+extern int auto_comment_line_char;
+
 /*
  * Wrapper of getenv() that returns a strdup value. This value is kept
  * in argv to be freed later.
index c870cb95b9d77b0cc9541c44344cf6e1ab25ca1d..bc4e61c5b1ad4b0ddbe8205ed7cb665737e1ccf5 100644 (file)
@@ -1,6 +1,7 @@
 #include "cache.h"
 #include "alloc.h"
 #include "config.h"
+#include "environment.h"
 #include "refs.h"
 #include "object-store.h"
 #include "diff.h"
index 0df5172630616d413dfd11fd22a3b0842e5a86a2..7fa776b061591c85a3a9b7cb4661f4971e175688 100644 (file)
@@ -1,6 +1,7 @@
 #include "cache.h"
 #include "alloc.h"
 #include "config.h"
+#include "environment.h"
 #include "gettext.h"
 #include "hex.h"
 #include "lockfile.h"
index 15209777d5a47a0456d22cd3690912a66f307783..b9cd593b14731ea8a2666a8522c36b5f423910b6 100644 (file)
--- a/strbuf.c
+++ b/strbuf.c
@@ -1,5 +1,6 @@
 #include "cache.h"
 #include "alloc.h"
+#include "environment.h"
 #include "gettext.h"
 #include "hex.h"
 #include "refs.h"
index 9eb1b76119050020bd9de61e3a6ae6c44af73524..6a5091a3c46b6f0e7853bfe201c59d1235b56236 100644 (file)
--- a/trailer.c
+++ b/trailer.c
@@ -1,6 +1,7 @@
 #include "cache.h"
 #include "alloc.h"
 #include "config.h"
+#include "environment.h"
 #include "gettext.h"
 #include "string-list.h"
 #include "run-command.h"
index d15f2b0e7e8331bb87195bf8aacb262fd96ed252..106e46480a177d23cdd8be2e81e9e527cca78400 100644 (file)
@@ -4,6 +4,7 @@
 #include "dir.h"
 #include "commit.h"
 #include "diff.h"
+#include "environment.h"
 #include "gettext.h"
 #include "hex.h"
 #include "revision.h"