summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/git.txt6
-rw-r--r--compat/mingw.h6
-rw-r--r--exec_cmd.c2
-rw-r--r--git-compat-util.h4
-rw-r--r--sha1_file.c2
5 files changed, 15 insertions, 5 deletions
diff --git a/Documentation/git.txt b/Documentation/git.txt
index 7414238fe5..4e4bd6ddb1 100644
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
@@ -409,9 +409,9 @@ git so take care if using Cogito etc.
'GIT_ALTERNATE_OBJECT_DIRECTORIES'::
Due to the immutable nature of git objects, old objects can be
archived into shared, read-only directories. This variable
- specifies a ":" separated list of git object directories which
- can be used to search for git objects. New objects will not be
- written to these directories.
+ specifies a ":" separated (on Windows ";" separated) list
+ of git object directories which can be used to search for git
+ objects. New objects will not be written to these directories.
'GIT_DIR'::
If the 'GIT_DIR' environment variable is set then it
diff --git a/compat/mingw.h b/compat/mingw.h
index e5c0c6ba21..22aae0077e 100644
--- a/compat/mingw.h
+++ b/compat/mingw.h
@@ -132,3 +132,9 @@ int getpagesize(void); /* defined in MinGW's libgcc.a */
struct passwd *getpwuid(int uid);
int setitimer(int type, struct itimerval *in, struct itimerval *out);
int sigaction(int sig, struct sigaction *in, struct sigaction *out);
+
+/*
+ * git specific compatibility
+ */
+
+#define PATH_SEP ';'
diff --git a/exec_cmd.c b/exec_cmd.c
index e189caca62..a1bc4e04bf 100644
--- a/exec_cmd.c
+++ b/exec_cmd.c
@@ -37,7 +37,7 @@ static void add_path(struct strbuf *out, const char *path)
else
strbuf_addstr(out, make_absolute_path(path));
- strbuf_addch(out, ':');
+ strbuf_addch(out, PATH_SEP);
}
}
diff --git a/git-compat-util.h b/git-compat-util.h
index da7249ac1c..9dc733e56c 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -110,6 +110,10 @@
#define PRIuMAX "llu"
#endif
+#ifndef PATH_SEP
+#define PATH_SEP ':'
+#endif
+
#ifdef __GNUC__
#define NORETURN __attribute__((__noreturn__))
#else
diff --git a/sha1_file.c b/sha1_file.c
index 191f814e09..6f004ffd09 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -392,7 +392,7 @@ void prepare_alt_odb(void)
if (!alt) alt = "";
alt_odb_tail = &alt_odb_list;
- link_alt_odb_entries(alt, alt + strlen(alt), ':', NULL, 0);
+ link_alt_odb_entries(alt, alt + strlen(alt), PATH_SEP, NULL, 0);
read_info_alternates(get_object_directory(), 0);
}