Browse Source

Windows: Use the Windows style PATH separator ';'.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
maint
Johannes Sixt 17 years ago
parent
commit
80ba074f41
  1. 6
      Documentation/git.txt
  2. 6
      compat/mingw.h
  3. 2
      exec_cmd.c
  4. 4
      git-compat-util.h
  5. 2
      sha1_file.c

6
Documentation/git.txt

@ -409,9 +409,9 @@ git so take care if using Cogito etc. @@ -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

6
compat/mingw.h

@ -132,3 +132,9 @@ int getpagesize(void); /* defined in MinGW's libgcc.a */ @@ -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 ';'

2
exec_cmd.c

@ -37,7 +37,7 @@ static void add_path(struct strbuf *out, const char *path) @@ -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);
}
}


4
git-compat-util.h

@ -110,6 +110,10 @@ @@ -110,6 +110,10 @@
#define PRIuMAX "llu"
#endif

#ifndef PATH_SEP
#define PATH_SEP ':'
#endif

#ifdef __GNUC__
#define NORETURN __attribute__((__noreturn__))
#else

2
sha1_file.c

@ -392,7 +392,7 @@ void prepare_alt_odb(void) @@ -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);
}

Loading…
Cancel
Save