[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/06: Makefile.am: Auto-configure Git on 'make'.
From: |
guix-commits |
Subject: |
03/06: Makefile.am: Auto-configure Git on 'make'. |
Date: |
Mon, 1 May 2023 12:40:09 -0400 (EDT) |
apteryx pushed a commit to branch master
in repository guix.
commit 8b972da068708a8b17f3ab153ea940690ca49ca9
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Sun Apr 23 10:28:59 2023 -0400
Makefile.am: Auto-configure Git on 'make'.
This means we do not need to worry anymore about manually syncing the
pre-push
git hook or the Guix-provided git configuration.
* etc/git/gitconfig: Augment configuration template with useful options to
allow for auto-configuration.
* Makefile.am (.git/hooks/pre-push, .git/config): New targets.
(nodist_noinst_DATA): New primary variable holding the above targets.
---
Makefile.am | 10 ++++++++++
etc/git/gitconfig | 16 ++++++++++++++++
2 files changed, 26 insertions(+)
diff --git a/Makefile.am b/Makefile.am
index 7fe18c9f6b..4a9124e0c2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -14,6 +14,7 @@
# Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
# Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
# Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
+# Copyright © 2020, 2021, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
# Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
# Copyright © 2021 Andrew Tropin <andrew@trop.in>
#
@@ -1112,6 +1113,15 @@ cuirass-jobs: $(GOBJECTS)
.PHONY: clean-go make-go as-derivation authenticate
.PHONY: update-guix-package update-NEWS cuirass-jobs release
+# Git auto-configuration.
+.git/hooks/pre-push: etc/git/pre-push
+ cp etc/git/pre-push .git/hooks/pre-push
+
+.git/config: etc/git/gitconfig
+ git config include.path ../etc/git/gitconfig
+
+nodist_noinst_DATA = .git/hooks/pre-push .git/config
+
# Downloading up-to-date PO files.
WEBLATE_REPO = https://framagit.org/tyreunom/guix-translations
diff --git a/etc/git/gitconfig b/etc/git/gitconfig
index c9ebdc8fa8..831fbce6e7 100644
--- a/etc/git/gitconfig
+++ b/etc/git/gitconfig
@@ -1,5 +1,21 @@
+[commit]
+ gpgsign = true
+
[diff "scheme"]
xfuncname = "^(\\(define.*)$"
[diff "texinfo"]
xfuncname = "^@node[[:space:]]+([^,]+).*$"
+
+[format]
+ forceinbodyfrom = true # help preserve commit authorship
+ thread = shallow
+ useAutoBase = true
+
+[pull]
+ rebase = true
+
+[sendemail]
+ to = guix-patches@gnu.org
+ headerCmd = etc/teams.scm cc-members-header-cmd
+ thread = no
- branch master updated (df504d84ca -> f21007ce4a), guix-commits, 2023/05/01
- 01/06: gnu: git: Apply patch adding the --header-cmd feature., guix-commits, 2023/05/01
- 04/06: teams: Add a 'cc-mentors-header-cmd' action., guix-commits, 2023/05/01
- 05/06: doc: Simplify contributing section by automating git configuration., guix-commits, 2023/05/01
- 02/06: teams: Add 'cc-members-header-cmd' action., guix-commits, 2023/05/01
- 06/06: .patman: Remove get_maintainer_script option., guix-commits, 2023/05/01
- 03/06: Makefile.am: Auto-configure Git on 'make'.,
guix-commits <=