environment: move comment_line_char from cache.h
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>
Elijah Newren committed
Mar 21, 2023 at 06:25 UTC
7ee24e18e55f5459183189a793cb216fb50c20f8
13 files changed
+18
-7
add-patch.c
+1
@@ -1,6 +1,7 @@
1
#include "cache.h"
2
#include "add-interactive.h"
3
#include "alloc.h"
4
+#include "environment.h"
5
#include "gettext.h"
6
#include "strbuf.h"
7
#include "run-command.h"
builtin/branch.c
+1
@@ -8,6 +8,7 @@
8
#include "cache.h"
9
#include "config.h"
10
#include "color.h"
11
+#include "environment.h"
12
#include "refs.h"
13
#include "commit.h"
14
#include "builtin.h"
builtin/commit.c
+1
@@ -12,6 +12,7 @@
12
#include "cache-tree.h"
13
#include "color.h"
14
#include "dir.h"
15
+#include "environment.h"
16
#include "builtin.h"
17
#include "diff.h"
18
#include "diffcore.h"
builtin/merge.c
+1
@@ -10,6 +10,7 @@
10
#include "cache.h"
11
#include "alloc.h"
12
#include "config.h"
13
+#include "environment.h"
14
#include "gettext.h"
15
#include "hex.h"
16
#include "parse-options.h"
builtin/tag.c
+1
@@ -9,6 +9,7 @@
9
#include "cache.h"
10
#include "config.h"
11
#include "builtin.h"
12
+#include "environment.h"
13
#include "gettext.h"
14
#include "hex.h"
15
#include "refs.h"
cache.h
-7
@@ -959,13 +959,6 @@ extern int sparse_expect_files_outside_of_patterns;
959
*/
960
int use_optional_locks(void);
961
962
-/*
963
- * The character that begins a commented line in user-editable file
964
- * that is subject to stripspace.
965
- */
966
-extern char comment_line_char;
967
-extern int auto_comment_line_char;
968
-
962
enum log_refs_config {
963
LOG_REFS_UNSET = -1,
964
LOG_REFS_NONE = 0,
commit.c
+1
@@ -2,6 +2,7 @@
2
#include "tag.h"
3
#include "commit.h"
4
#include "commit-graph.h"
5
+#include "environment.h"
6
#include "gettext.h"
7
#include "hex.h"
8
#include "repository.h"
environment.h
+7
@@ -3,6 +3,13 @@
3
4
#include "strvec.h"
5
6
+/*
7
+ * The character that begins a commented line in user-editable file
8
+ * that is subject to stripspace.
9
+ */
10
+extern char comment_line_char;
11
+extern int auto_comment_line_char;
12
+
13
/*
14
* Wrapper of getenv() that returns a strdup value. This value is kept
15
* in argv to be freed later.
fmt-merge-msg.c
+1
@@ -1,6 +1,7 @@
1
#include "cache.h"
2
#include "alloc.h"
3
#include "config.h"
4
+#include "environment.h"
5
#include "refs.h"
6
#include "object-store.h"
7
#include "diff.h"
sequencer.c
+1
@@ -1,6 +1,7 @@
1
#include "cache.h"
2
#include "alloc.h"
3
#include "config.h"
4
+#include "environment.h"
5
#include "gettext.h"
6
#include "hex.h"
7
#include "lockfile.h"
strbuf.c
+1
@@ -1,5 +1,6 @@
1
#include "cache.h"
2
#include "alloc.h"
3
+#include "environment.h"
4
#include "gettext.h"
5
#include "hex.h"
6
#include "refs.h"
trailer.c
+1
@@ -1,6 +1,7 @@
1
#include "cache.h"
2
#include "alloc.h"
3
#include "config.h"
4
+#include "environment.h"
5
#include "gettext.h"
6
#include "string-list.h"
7
#include "run-command.h"
wt-status.c
+1
@@ -4,6 +4,7 @@
4
#include "dir.h"
5
#include "commit.h"
6
#include "diff.h"
7
+#include "environment.h"
8
#include "gettext.h"
9
#include "hex.h"
10
#include "revision.h"