Skip to content

Commit 7ee24e1

Browse files
newrengitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 4f6728d commit 7ee24e1

File tree

13 files changed

+18
-7
lines changed

13 files changed

+18
-7
lines changed

add-patch.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include "cache.h"
22
#include "add-interactive.h"
33
#include "alloc.h"
4+
#include "environment.h"
45
#include "gettext.h"
56
#include "strbuf.h"
67
#include "run-command.h"

builtin/branch.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include "cache.h"
99
#include "config.h"
1010
#include "color.h"
11+
#include "environment.h"
1112
#include "refs.h"
1213
#include "commit.h"
1314
#include "builtin.h"

builtin/commit.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include "cache-tree.h"
1313
#include "color.h"
1414
#include "dir.h"
15+
#include "environment.h"
1516
#include "builtin.h"
1617
#include "diff.h"
1718
#include "diffcore.h"

builtin/merge.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include "cache.h"
1111
#include "alloc.h"
1212
#include "config.h"
13+
#include "environment.h"
1314
#include "gettext.h"
1415
#include "hex.h"
1516
#include "parse-options.h"

builtin/tag.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include "cache.h"
1010
#include "config.h"
1111
#include "builtin.h"
12+
#include "environment.h"
1213
#include "gettext.h"
1314
#include "hex.h"
1415
#include "refs.h"

cache.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -959,13 +959,6 @@ extern int sparse_expect_files_outside_of_patterns;
959959
*/
960960
int use_optional_locks(void);
961961

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-
969962
enum log_refs_config {
970963
LOG_REFS_UNSET = -1,
971964
LOG_REFS_NONE = 0,

commit.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include "tag.h"
33
#include "commit.h"
44
#include "commit-graph.h"
5+
#include "environment.h"
56
#include "gettext.h"
67
#include "hex.h"
78
#include "repository.h"

environment.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33

44
#include "strvec.h"
55

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+
613
/*
714
* Wrapper of getenv() that returns a strdup value. This value is kept
815
* in argv to be freed later.

fmt-merge-msg.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include "cache.h"
22
#include "alloc.h"
33
#include "config.h"
4+
#include "environment.h"
45
#include "refs.h"
56
#include "object-store.h"
67
#include "diff.h"

sequencer.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include "cache.h"
22
#include "alloc.h"
33
#include "config.h"
4+
#include "environment.h"
45
#include "gettext.h"
56
#include "hex.h"
67
#include "lockfile.h"

0 commit comments

Comments
 (0)