diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | cgit.c | 17 | ||||
m--------- | git | 0 |
3 files changed, 12 insertions, 7 deletions
@@ -14,7 +14,7 @@ htmldir = $(docdir) | |||
14 | pdfdir = $(docdir) | 14 | pdfdir = $(docdir) |
15 | mandir = $(prefix)/share/man | 15 | mandir = $(prefix)/share/man |
16 | SHA1_HEADER = <openssl/sha.h> | 16 | SHA1_HEADER = <openssl/sha.h> |
17 | GIT_VER = 2.21.0 | 17 | GIT_VER = 2.22.0 |
18 | GIT_URL = https://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.xz | 18 | GIT_URL = https://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.xz |
19 | INSTALL = install | 19 | INSTALL = install |
20 | COPYTREE = cp -r | 20 | COPYTREE = cp -r |
@@ -19,6 +19,16 @@ | |||
19 | 19 | ||
20 | const char *cgit_version = CGIT_VERSION; | 20 | const char *cgit_version = CGIT_VERSION; |
21 | 21 | ||
22 | __attribute__((constructor)) | ||
23 | static void constructor_environment() | ||
24 | { | ||
25 | /* Do not look in /etc/ for gitconfig and gitattributes. */ | ||
26 | setenv("GIT_CONFIG_NOSYSTEM", "1", 1); | ||
27 | setenv("GIT_ATTR_NOSYSTEM", "1", 1); | ||
28 | unsetenv("HOME"); | ||
29 | unsetenv("XDG_CONFIG_HOME"); | ||
30 | } | ||
31 | |||
22 | static void add_mimetype(const char *name, const char *value) | 32 | static void add_mimetype(const char *name, const char *value) |
23 | { | 33 | { |
24 | struct string_list_item *item; | 34 | struct string_list_item *item; |
@@ -565,18 +575,13 @@ static void prepare_repo_env(int *nongit) | |||
565 | /* The path to the git repository. */ | 575 | /* The path to the git repository. */ |
566 | setenv("GIT_DIR", ctx.repo->path, 1); | 576 | setenv("GIT_DIR", ctx.repo->path, 1); |
567 | 577 | ||
568 | /* Do not look in /etc/ for gitconfig and gitattributes. */ | ||
569 | setenv("GIT_CONFIG_NOSYSTEM", "1", 1); | ||
570 | setenv("GIT_ATTR_NOSYSTEM", "1", 1); | ||
571 | unsetenv("HOME"); | ||
572 | unsetenv("XDG_CONFIG_HOME"); | ||
573 | |||
574 | /* Setup the git directory and initialize the notes system. Both of these | 578 | /* Setup the git directory and initialize the notes system. Both of these |
575 | * load local configuration from the git repository, so we do them both while | 579 | * load local configuration from the git repository, so we do them both while |
576 | * the HOME variables are unset. */ | 580 | * the HOME variables are unset. */ |
577 | setup_git_directory_gently(nongit); | 581 | setup_git_directory_gently(nongit); |
578 | init_display_notes(NULL); | 582 | init_display_notes(NULL); |
579 | } | 583 | } |
584 | |||
580 | static int prepare_repo_cmd(int nongit) | 585 | static int prepare_repo_cmd(int nongit) |
581 | { | 586 | { |
582 | struct object_id oid; | 587 | struct object_id oid; |
diff --git a/git b/git | |||
Subproject 8104ec994ea3849a968b4667d072fedd1e68864 | Subproject b697d92f56511e804b8ba20ccbe7bdc85dc6681 | ||