]> Kevux Git Server - rit/commitdiff
Windows: Use the Windows style PATH separator ';'.
authorJohannes Sixt <johannes.sixt@telecom.at>
Mon, 3 Dec 2007 20:55:57 +0000 (21:55 +0100)
committerJohannes Sixt <johannes.sixt@telecom.at>
Sun, 22 Jun 2008 09:32:45 +0000 (11:32 +0200)
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Documentation/git.txt
compat/mingw.h
exec_cmd.c
git-compat-util.h
sha1_file.c

index 7414238..4e4bd6d 100644 (file)
@@ -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
index e5c0c6b..22aae00 100644 (file)
@@ -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 ';'
index e189cac..a1bc4e0 100644 (file)
@@ -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);
        }
 }
 
index da7249a..9dc733e 100644 (file)
 #define PRIuMAX "llu"
 #endif
 
+#ifndef PATH_SEP
+#define PATH_SEP ':'
+#endif
+
 #ifdef __GNUC__
 #define NORETURN __attribute__((__noreturn__))
 #else
index 191f814..6f004ff 100644 (file)
@@ -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);
 }