Code

Merge branch 'eb/core-eol'
[git.git] / environment.c
index 739ec2704031f0dd9d4a380e07f001c09742a7be..83d38d3c2354e8582d5af91c6d529a2f2836dc2c 100644 (file)
@@ -38,8 +38,9 @@ const char *pager_program;
 int pager_use_color = 1;
 const char *editor_program;
 const char *excludes_file;
-int auto_crlf = 0;     /* 1: both ways, -1: only when adding git objects */
+enum auto_crlf auto_crlf = AUTO_CRLF_FALSE;
 int read_replace_refs = 1;
+enum eol eol = EOL_UNSET;
 enum safe_crlf safe_crlf = SAFE_CRLF_WARN;
 unsigned whitespace_rule_cfg = WS_DEFAULT_RULE;
 enum branch_track git_branch_track = BRANCH_TRACK_REMOTE;
@@ -63,6 +64,23 @@ static char *work_tree;
 static const char *git_dir;
 static char *git_object_dir, *git_index_file, *git_refs_dir, *git_graft_file;
 
+/*
+ * Repository-local GIT_* environment variables
+ * Remember to update local_repo_env_size in cache.h when
+ * the size of the list changes
+ */
+const char * const local_repo_env[LOCAL_REPO_ENV_SIZE + 1] = {
+       ALTERNATE_DB_ENVIRONMENT,
+       CONFIG_ENVIRONMENT,
+       DB_ENVIRONMENT,
+       GIT_DIR_ENVIRONMENT,
+       GIT_WORK_TREE_ENVIRONMENT,
+       GRAFT_ENVIRONMENT,
+       INDEX_ENVIRONMENT,
+       NO_REPLACE_OBJECTS_ENVIRONMENT,
+       NULL
+};
+
 static void setup_git_env(void)
 {
        git_dir = getenv(GIT_DIR_ENVIRONMENT);