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>
This commit is contained in:
Elijah Newren 2023-03-21 06:25:57 +00:00 committed by Junio C Hamano
parent 4f6728d52d
commit 7ee24e18e5
13 changed files with 18 additions and 7 deletions

View File

@ -1,6 +1,7 @@
#include "cache.h" #include "cache.h"
#include "add-interactive.h" #include "add-interactive.h"
#include "alloc.h" #include "alloc.h"
#include "environment.h"
#include "gettext.h" #include "gettext.h"
#include "strbuf.h" #include "strbuf.h"
#include "run-command.h" #include "run-command.h"

View File

@ -8,6 +8,7 @@
#include "cache.h" #include "cache.h"
#include "config.h" #include "config.h"
#include "color.h" #include "color.h"
#include "environment.h"
#include "refs.h" #include "refs.h"
#include "commit.h" #include "commit.h"
#include "builtin.h" #include "builtin.h"

View File

@ -12,6 +12,7 @@
#include "cache-tree.h" #include "cache-tree.h"
#include "color.h" #include "color.h"
#include "dir.h" #include "dir.h"
#include "environment.h"
#include "builtin.h" #include "builtin.h"
#include "diff.h" #include "diff.h"
#include "diffcore.h" #include "diffcore.h"

View File

@ -10,6 +10,7 @@
#include "cache.h" #include "cache.h"
#include "alloc.h" #include "alloc.h"
#include "config.h" #include "config.h"
#include "environment.h"
#include "gettext.h" #include "gettext.h"
#include "hex.h" #include "hex.h"
#include "parse-options.h" #include "parse-options.h"

View File

@ -9,6 +9,7 @@
#include "cache.h" #include "cache.h"
#include "config.h" #include "config.h"
#include "builtin.h" #include "builtin.h"
#include "environment.h"
#include "gettext.h" #include "gettext.h"
#include "hex.h" #include "hex.h"
#include "refs.h" #include "refs.h"

View File

@ -959,13 +959,6 @@ extern int sparse_expect_files_outside_of_patterns;
*/ */
int use_optional_locks(void); 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 { enum log_refs_config {
LOG_REFS_UNSET = -1, LOG_REFS_UNSET = -1,
LOG_REFS_NONE = 0, LOG_REFS_NONE = 0,

View File

@ -2,6 +2,7 @@
#include "tag.h" #include "tag.h"
#include "commit.h" #include "commit.h"
#include "commit-graph.h" #include "commit-graph.h"
#include "environment.h"
#include "gettext.h" #include "gettext.h"
#include "hex.h" #include "hex.h"
#include "repository.h" #include "repository.h"

View File

@ -3,6 +3,13 @@
#include "strvec.h" #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 * Wrapper of getenv() that returns a strdup value. This value is kept
* in argv to be freed later. * in argv to be freed later.

View File

@ -1,6 +1,7 @@
#include "cache.h" #include "cache.h"
#include "alloc.h" #include "alloc.h"
#include "config.h" #include "config.h"
#include "environment.h"
#include "refs.h" #include "refs.h"
#include "object-store.h" #include "object-store.h"
#include "diff.h" #include "diff.h"

View File

@ -1,6 +1,7 @@
#include "cache.h" #include "cache.h"
#include "alloc.h" #include "alloc.h"
#include "config.h" #include "config.h"
#include "environment.h"
#include "gettext.h" #include "gettext.h"
#include "hex.h" #include "hex.h"
#include "lockfile.h" #include "lockfile.h"

View File

@ -1,5 +1,6 @@
#include "cache.h" #include "cache.h"
#include "alloc.h" #include "alloc.h"
#include "environment.h"
#include "gettext.h" #include "gettext.h"
#include "hex.h" #include "hex.h"
#include "refs.h" #include "refs.h"

View File

@ -1,6 +1,7 @@
#include "cache.h" #include "cache.h"
#include "alloc.h" #include "alloc.h"
#include "config.h" #include "config.h"
#include "environment.h"
#include "gettext.h" #include "gettext.h"
#include "string-list.h" #include "string-list.h"
#include "run-command.h" #include "run-command.h"

View File

@ -4,6 +4,7 @@
#include "dir.h" #include "dir.h"
#include "commit.h" #include "commit.h"
#include "diff.h" #include "diff.h"
#include "environment.h"
#include "gettext.h" #include "gettext.h"
#include "hex.h" #include "hex.h"
#include "revision.h" #include "revision.h"