* [PATCH 1/2] git: update to v2.22.0
@ 2019-10-23 21:17 list
2019-10-23 21:17 ` [PATCH 2/2] git: update to v2.23.0 list
2019-10-24 6:38 ` [PATCH v2 1/2] git: update to v2.22.0 list
0 siblings, 2 replies; 4+ messages in thread
From: list @ 2019-10-23 21:17 UTC (permalink / raw)
From: Christian Hesse <mail at eworm.de>
Update to git version v2.22.0.
Upstream commit bce9db6d ("trace2: use system/global config for default
trace2 settings") caused a regression. Due to early loading of config
unsetting HOME and XDG_CONFIG_HOME is too late.
Do not link common-main.o but build a private copy without trace2_*()
function calls.
Signed-off-by: Christian Hesse <mail at eworm.de>
---
.gitignore | 1 +
Makefile | 2 +-
cgit.mk | 6 +++++-
git | 2 +-
4 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/.gitignore b/.gitignore
index 661df34..3832e0d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,7 @@
# Files I don't care to see in git-status/commit
/cgit
cgit.conf
+cgit-main.c
CGIT-CFLAGS
VERSION
cgitrc.5
diff --git a/Makefile b/Makefile
index 40f4fd8..b2bd351 100644
--- a/Makefile
+++ b/Makefile
@@ -14,7 +14,7 @@ htmldir = $(docdir)
pdfdir = $(docdir)
mandir = $(prefix)/share/man
SHA1_HEADER = <openssl/sha.h>
-GIT_VER = 2.21.0
+GIT_VER = 2.22.0
GIT_URL = https://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.xz
INSTALL = install
COPYTREE = cp -r
diff --git a/cgit.mk b/cgit.mk
index 3fcc1ca..76f1430 100644
--- a/cgit.mk
+++ b/cgit.mk
@@ -68,6 +68,7 @@ ifdef HAVE_LINUX_SENDFILE
endif
CGIT_OBJ_NAMES += cgit.o
+CGIT_OBJ_NAMES += cgit-main.o
CGIT_OBJ_NAMES += cache.o
CGIT_OBJ_NAMES += cmd.o
CGIT_OBJ_NAMES += configfile.o
@@ -126,10 +127,13 @@ $(CGIT_PREFIX)CGIT-CFLAGS: FORCE
echo "$$FLAGS" >$(CGIT_PREFIX)CGIT-CFLAGS; \
fi
+$(CGIT_PREFIX)cgit-main.c: common-main.c
+ sed -e '/trace2/s|^|//|' -e '/^#include/s|"|"git/|' > $(CGIT_PREFIX)cgit-main.c < common-main.c
+
$(CGIT_OBJS): %.o: %.c GIT-CFLAGS $(CGIT_PREFIX)CGIT-CFLAGS $(missing_dep_dirs)
$(QUIET_CC)$(CC) -o $*.o -c $(dep_args) $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $(CGIT_CFLAGS) $<
-$(CGIT_PREFIX)cgit: $(CGIT_OBJS) GIT-LDFLAGS $(GITLIBS)
+$(CGIT_PREFIX)cgit: $(CGIT_OBJS) GIT-LDFLAGS $(filter-out common-main.o,$(GITLIBS)) ../cgit-main.o
@echo 1>&1 " * $(LUA_MESSAGE)"
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS) $(CGIT_LIBS)
diff --git a/git b/git
index 8104ec9..b697d92 160000
--- a/git
+++ b/git
@@ -1 +1 @@
-Subproject commit 8104ec994ea3849a968b4667d072fedd1e688642
+Subproject commit b697d92f56511e804b8ba20ccbe7bdc85dc66810
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2/2] git: update to v2.23.0
2019-10-23 21:17 [PATCH 1/2] git: update to v2.22.0 list
@ 2019-10-23 21:17 ` list
2019-10-24 6:38 ` [PATCH v2 1/2] git: update to v2.22.0 list
1 sibling, 0 replies; 4+ messages in thread
From: list @ 2019-10-23 21:17 UTC (permalink / raw)
From: Christian Hesse <mail at eworm.de>
Update to git version v2.23.0.
No changes required.
Signed-off-by: Christian Hesse <mail at eworm.de>
---
Makefile | 2 +-
git | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index b2bd351..96ad7cd 100644
--- a/Makefile
+++ b/Makefile
@@ -14,7 +14,7 @@ htmldir = $(docdir)
pdfdir = $(docdir)
mandir = $(prefix)/share/man
SHA1_HEADER = <openssl/sha.h>
-GIT_VER = 2.22.0
+GIT_VER = 2.23.0
GIT_URL = https://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.xz
INSTALL = install
COPYTREE = cp -r
diff --git a/git b/git
index b697d92..5fa0f52 160000
--- a/git
+++ b/git
@@ -1 +1 @@
-Subproject commit b697d92f56511e804b8ba20ccbe7bdc85dc66810
+Subproject commit 5fa0f5238b0cd46cfe7f6fa76c3f526ea98148d9
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2 1/2] git: update to v2.22.0
2019-10-23 21:17 [PATCH 1/2] git: update to v2.22.0 list
2019-10-23 21:17 ` [PATCH 2/2] git: update to v2.23.0 list
@ 2019-10-24 6:38 ` list
2019-10-24 8:17 ` [PATCH v3 " list
1 sibling, 1 reply; 4+ messages in thread
From: list @ 2019-10-24 6:38 UTC (permalink / raw)
From: Christian Hesse <mail at eworm.de>
Update to git version v2.22.0.
Upstream commit bce9db6d ("trace2: use system/global config for default
trace2 settings") caused a regression. Due to early loading of config
unsetting HOME and XDG_CONFIG_HOME is too late.
Do not link common-main.o but build a private copy without trace2_*()
function calls.
Signed-off-by: Christian Hesse <mail at eworm.de>
---
.gitignore | 1 +
Makefile | 2 +-
cgit.mk | 6 +++++-
git | 2 +-
4 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/.gitignore b/.gitignore
index 661df34..3832e0d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,7 @@
# Files I don't care to see in git-status/commit
/cgit
cgit.conf
+cgit-main.c
CGIT-CFLAGS
VERSION
cgitrc.5
diff --git a/Makefile b/Makefile
index 40f4fd8..b2bd351 100644
--- a/Makefile
+++ b/Makefile
@@ -14,7 +14,7 @@ htmldir = $(docdir)
pdfdir = $(docdir)
mandir = $(prefix)/share/man
SHA1_HEADER = <openssl/sha.h>
-GIT_VER = 2.21.0
+GIT_VER = 2.22.0
GIT_URL = https://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.xz
INSTALL = install
COPYTREE = cp -r
diff --git a/cgit.mk b/cgit.mk
index 3fcc1ca..76f1430 100644
--- a/cgit.mk
+++ b/cgit.mk
@@ -68,6 +68,7 @@ ifdef HAVE_LINUX_SENDFILE
endif
CGIT_OBJ_NAMES += cgit.o
+CGIT_OBJ_NAMES += cgit-main.o
CGIT_OBJ_NAMES += cache.o
CGIT_OBJ_NAMES += cmd.o
CGIT_OBJ_NAMES += configfile.o
@@ -126,10 +127,13 @@ $(CGIT_PREFIX)CGIT-CFLAGS: FORCE
echo "$$FLAGS" >$(CGIT_PREFIX)CGIT-CFLAGS; \
fi
+$(CGIT_PREFIX)cgit-main.c: common-main.c
+ sed -e '/trace2/s|^|//|' -e '/^#include/s|"|"git/|' > $@ < $<
+
$(CGIT_OBJS): %.o: %.c GIT-CFLAGS $(CGIT_PREFIX)CGIT-CFLAGS $(missing_dep_dirs)
$(QUIET_CC)$(CC) -o $*.o -c $(dep_args) $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $(CGIT_CFLAGS) $<
-$(CGIT_PREFIX)cgit: $(CGIT_OBJS) GIT-LDFLAGS $(GITLIBS)
+$(CGIT_PREFIX)cgit: $(CGIT_OBJS) GIT-LDFLAGS $(filter-out common-main.o,$(GITLIBS))
@echo 1>&1 " * $(LUA_MESSAGE)"
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS) $(CGIT_LIBS)
diff --git a/git b/git
index 8104ec9..b697d92 160000
--- a/git
+++ b/git
@@ -1 +1 @@
-Subproject commit 8104ec994ea3849a968b4667d072fedd1e688642
+Subproject commit b697d92f56511e804b8ba20ccbe7bdc85dc66810
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v3 1/2] git: update to v2.22.0
2019-10-24 6:38 ` [PATCH v2 1/2] git: update to v2.22.0 list
@ 2019-10-24 8:17 ` list
0 siblings, 0 replies; 4+ messages in thread
From: list @ 2019-10-24 8:17 UTC (permalink / raw)
From: Christian Hesse <mail at eworm.de>
Update to git version v2.22.0.
Upstream commit bce9db6d ("trace2: use system/global config for default
trace2 settings") caused a regression. We have to unset HOME and
XDG_CONFIG_HOME before early loading of config from trace2 code kicks in.
Signed-off-by: Christian Hesse <mail at eworm.de>
---
Makefile | 2 +-
cgit.c | 9 +++++++--
git | 2 +-
3 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
index 40f4fd8..b2bd351 100644
--- a/Makefile
+++ b/Makefile
@@ -14,7 +14,7 @@ htmldir = $(docdir)
pdfdir = $(docdir)
mandir = $(prefix)/share/man
SHA1_HEADER = <openssl/sha.h>
-GIT_VER = 2.21.0
+GIT_VER = 2.22.0
GIT_URL = https://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.xz
INSTALL = install
COPYTREE = cp -r
diff --git a/cgit.c b/cgit.c
index 2910d4b..3b71faf 100644
--- a/cgit.c
+++ b/cgit.c
@@ -19,6 +19,12 @@
const char *cgit_version = CGIT_VERSION;
+__attribute__((constructor))
+static void constructor_unsetenv() {
+ unsetenv("HOME");
+ unsetenv("XDG_CONFIG_HOME");
+}
+
static void add_mimetype(const char *name, const char *value)
{
struct string_list_item *item;
@@ -568,8 +574,6 @@ static void prepare_repo_env(int *nongit)
/* Do not look in /etc/ for gitconfig and gitattributes. */
setenv("GIT_CONFIG_NOSYSTEM", "1", 1);
setenv("GIT_ATTR_NOSYSTEM", "1", 1);
- unsetenv("HOME");
- unsetenv("XDG_CONFIG_HOME");
/* Setup the git directory and initialize the notes system. Both of these
* load local configuration from the git repository, so we do them both while
@@ -577,6 +581,7 @@ static void prepare_repo_env(int *nongit)
setup_git_directory_gently(nongit);
init_display_notes(NULL);
}
+
static int prepare_repo_cmd(int nongit)
{
struct object_id oid;
diff --git a/git b/git
index 8104ec9..b697d92 160000
--- a/git
+++ b/git
@@ -1 +1 @@
-Subproject commit 8104ec994ea3849a968b4667d072fedd1e688642
+Subproject commit b697d92f56511e804b8ba20ccbe7bdc85dc66810
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-10-24 8:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-23 21:17 [PATCH 1/2] git: update to v2.22.0 list
2019-10-23 21:17 ` [PATCH 2/2] git: update to v2.23.0 list
2019-10-24 6:38 ` [PATCH v2 1/2] git: update to v2.22.0 list
2019-10-24 8:17 ` [PATCH v3 " list
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).