GNU bug report logs - #63261
Recent changes to git config cause errors for non-committers

Previous Next

Package: guix;

Reported by: Brian Cully <bjc <at> spork.org>

Date: Thu, 4 May 2023 10:57:02 UTC

Severity: normal

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 63261 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: 63261 <at> debbugs.gnu.org
Cc: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>, bjc <at> spork.org
Subject: [PATCH] Makefile.am: Only auto-configure Git when available.
Date: Thu,  4 May 2023 10:06:14 -0400
* Makefile.am (.git/hooks/pre-push): Only run recipe if the '.git' directory
exists.  Make it silent.
(.git/config): Likewise, and also check if the 'git' command is available.

Reported-by: Brian Cully <bjc <at> spork.org>
---
 Makefile.am | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 4a9124e0c2..8af69f88ac 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1115,10 +1115,14 @@ cuirass-jobs: $(GOBJECTS)
 
 # Git auto-configuration.
 .git/hooks/pre-push: etc/git/pre-push
-	cp etc/git/pre-push .git/hooks/pre-push
+	$(AM_V_at)if test -d .git; then \
+	cp etc/git/pre-push .git/hooks/pre-push; \
+	fi
 
 .git/config: etc/git/gitconfig
-	git config include.path ../etc/git/gitconfig
+	$(AM_V_at)if command -v git >/dev/null && test -d .git; then \
+	git config include.path ../etc/git/gitconfig; \
+	fi
 
 nodist_noinst_DATA = .git/hooks/pre-push .git/config
 

base-commit: ae6643326a983d141fd8320a755181d21e5a1f2f
-- 
2.39.2





This bug report was last modified 2 years and 11 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.