diff --git a/Makefile b/Makefile index 4c749a0357..8586fcd397 100644 --- a/Makefile +++ b/Makefile @@ -523,7 +523,8 @@ ifneq (,$(findstring MINGW,$(uname_S))) EXTLIBS += -lws2_32 X = .exe NOEXECTEMPL = .noexec - prefix = + template_dir = ../share/git-core/templates/ + ETC_GITCONFIG = ../etc/gitconfig endif ifneq (,$(findstring arm,$(uname_M))) ARM_SHA1 = YesPlease @@ -774,12 +775,12 @@ endif # Shell quote (do not use $(call) to accommodate ancient setups); SHA1_HEADER_SQ = $(subst ','\'',$(SHA1_HEADER)) -ETC_GITCONFIG_SQ = \057etc/gitconfig +ETC_GITCONFIG_SQ = $(subst ','\'',$(ETC_GITCONFIG)) DESTDIR_SQ = $(subst ','\'',$(DESTDIR)) bindir_SQ = $(subst ','\'',$(bindir)) gitexecdir_SQ = $(subst ','\'',$(gitexecdir)) -template_dir_SQ = \057share/git-core/templates +template_dir_SQ = $(subst ','\'',$(template_dir)) prefix_SQ = $(subst ','\'',$(prefix)) sysconfdir_SQ = $(subst ','\'',$(sysconfdir)) diff --git a/builtin-init-db.c b/builtin-init-db.c index 2feec40eb6..bb132ec086 100644 --- a/builtin-init-db.c +++ b/builtin-init-db.c @@ -145,17 +145,6 @@ static void copy_templates(const char *git_dir, int len, const char *template_di template_dir = prefix_path(exec_path, strlen(exec_path), template_dir); } -#if __MINGW32__ - /* - * If it is an absolute Unix path it is prefixed with - * the git_install_prefix(). - */ - else if (template_dir[0] == '/') { - const char* prefix = git_install_prefix(); - template_dir = prefix_path(prefix, strlen(prefix), - template_dir); - } -#endif } strcpy(template_path, template_dir); template_len = strlen(template_path); diff --git a/config.c b/config.c index 0b167ceb75..7b9ded1655 100644 --- a/config.c +++ b/config.c @@ -473,17 +473,6 @@ const char *git_etc_gitconfig(void) system_wide = prefix_path(exec_path, strlen(exec_path), system_wide); } -#if __MINGW32__ - /* - * If it is an absolute Unix path it is prefixed with - * the git_install_prefix(). - */ - else if (system_wide[0] == '/') { - const char* prefix = git_install_prefix(); - system_wide = prefix_path(prefix, strlen(prefix), - system_wide); - } -#endif } return system_wide; }