Windows: Use the Windows style PATH separator ';'.
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Johannes Sixt committed
Dec 3, 2007 at 21:55 UTC
80ba074f4163dc8ee4232d64e73a8521edcadc1d
5 files changed
+15
-5
Documentation/git.txt
+3
-3
@@ -409,9 +409,9 @@ git so take care if using Cogito etc.
409
'GIT_ALTERNATE_OBJECT_DIRECTORIES'::
410
Due to the immutable nature of git objects, old objects can be
411
archived into shared, read-only directories. This variable
412
- specifies a ":" separated list of git object directories which
413
- can be used to search for git objects. New objects will not be
414
- written to these directories.
412
+ specifies a ":" separated (on Windows ";" separated) list
413
+ of git object directories which can be used to search for git
414
+ objects. New objects will not be written to these directories.
415
416
'GIT_DIR'::
417
If the 'GIT_DIR' environment variable is set then it
compat/mingw.h
+6
@@ -132,3 +132,9 @@ int getpagesize(void); /* defined in MinGW's libgcc.a */
132
struct passwd *getpwuid(int uid);
133
int setitimer(int type, struct itimerval *in, struct itimerval *out);
134
int sigaction(int sig, struct sigaction *in, struct sigaction *out);
135
+
136
+/*
137
+ * git specific compatibility
138
+ */
139
+
140
+#define PATH_SEP ';'
exec_cmd.c
+1
-1
@@ -37,7 +37,7 @@ static void add_path(struct strbuf *out, const char *path)
37
else
38
strbuf_addstr(out, make_absolute_path(path));
39
40
- strbuf_addch(out, ':');
40
+ strbuf_addch(out, PATH_SEP);
41
}
42
}
43
git-compat-util.h
+4
@@ -110,6 +110,10 @@
110
#define PRIuMAX "llu"
111
#endif
112
113
+#ifndef PATH_SEP
114
+#define PATH_SEP ':'
115
+#endif
116
+
117
#ifdef __GNUC__
118
#define NORETURN __attribute__((__noreturn__))
119
#else
sha1_file.c
+1
-1
@@ -392,7 +392,7 @@ void prepare_alt_odb(void)
392
if (!alt) alt = "";
393
394
alt_odb_tail = &alt_odb_list;
395
- link_alt_odb_entries(alt, alt + strlen(alt), ':', NULL, 0);
395
+ link_alt_odb_entries(alt, alt + strlen(alt), PATH_SEP, NULL, 0);
396
397
read_info_alternates(get_object_directory(), 0);
398
}