Skip to content

Commit

Permalink
Merge pull request #2358 from dscho/reconcile-system-config-and-progr…
Browse files Browse the repository at this point in the history
…amdata-config

Make `git config --system` work like you think it should on Windows
  • Loading branch information
dscho committed Nov 25, 2019
2 parents af651fa + a81f371 commit a5230a5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
6 changes: 4 additions & 2 deletions config.c
Original file line number Diff line number Diff line change
Expand Up @@ -1662,9 +1662,11 @@ static int git_config_from_blob_ref(config_fn_t fn,

const char *git_etc_gitconfig(void)
{
static const char *system_wide;
if (!system_wide)
static char *system_wide;
if (!system_wide) {
system_wide = system_path(ETC_GITCONFIG);
normalize_path_copy(system_wide, system_wide);
}
return system_wide;
}

Expand Down
10 changes: 10 additions & 0 deletions config.mak.uname
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,11 @@ ifeq ($(uname_S),Windows)
NO_POSIX_GOODIES = UnfortunatelyYes
NATIVE_CRLF = YesPlease
DEFAULT_HELP_FORMAT = html
ifeq (/mingw64,$(subst 32,64,$(prefix)))
# Move system config into top-level /etc/
ETC_GITCONFIG = ../etc/gitconfig
ETC_GITATTRIBUTES = ../etc/gitattributes
endif

CC = compat/vcbuild/scripts/clink.pl
AR = compat/vcbuild/scripts/lib.pl
Expand Down Expand Up @@ -670,6 +675,11 @@ else
NO_LIBPCRE1_JIT = UnfortunatelyYes
NO_CURL =
USE_NED_ALLOCATOR = YesPlease
ifeq (/mingw64,$(subst 32,64,$(prefix)))
# Move system config into top-level /etc/
ETC_GITCONFIG = ../etc/gitconfig
ETC_GITATTRIBUTES = ../etc/gitattributes
endif
else
COMPAT_CFLAGS += -D__USE_MINGW_ANSI_STDIO
NO_CURL = YesPlease
Expand Down

0 comments on commit a5230a5

Please sign in to comment.