From 9b4b9da619e4bcb25eb581ddb73ff628cc97ac95 Mon Sep 17 00:00:00 2001 From: Johannes Sixt Date: Mon, 14 Jan 2008 13:03:34 +0100 Subject: [PATCH] Windows: Fix path separator of GIT_ALTERNATE_OBJECT_DIRECTORIES. For consistency and technical reasons on Windows (':' is usually part of directory names), we must use ';' as path separator. Signed-off-by: Johannes Sixt --- Documentation/git.txt | 6 +++--- sha1_file.c | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Documentation/git.txt b/Documentation/git.txt index 4ece40d1eb..6e0540d0e6 100644 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@ -375,9 +375,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/sha1_file.c b/sha1_file.c index 08cebe1fae..93a34271e6 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -395,7 +395,11 @@ void prepare_alt_odb(void) if (!alt) alt = ""; alt_odb_tail = &alt_odb_list; +#ifdef __MINGW32__ + link_alt_odb_entries(alt, alt + strlen(alt), ';', NULL, 0); +#else link_alt_odb_entries(alt, alt + strlen(alt), ':', NULL, 0); +#endif read_info_alternates(get_object_directory(), 0); }