summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2023-04-23 10:28:59 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2023-05-01 12:39:11 -0400
commit8b972da068708a8b17f3ab153ea940690ca49ca9 (patch)
tree7036b0bc6093b76ef541af8db335a86101589d85
parent0eddeb9896985e4139f412e41991ac5633a104ba (diff)
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.
-rw-r--r--Makefile.am10
-rw-r--r--etc/git/gitconfig16
2 files changed, 26 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index 7fe18c9f6b4..4a9124e0c2c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -14,6 +14,7 @@
14# Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com> 14# Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
15# Copyright © 2018 Alex Vong <alexvong1995@gmail.com> 15# Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
16# Copyright © 2019 Efraim Flashner <efraim@flashner.co.il> 16# Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
17# Copyright © 2020, 2021, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
17# Copyright © 2021 Chris Marusich <cmmarusich@gmail.com> 18# Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
18# Copyright © 2021 Andrew Tropin <andrew@trop.in> 19# Copyright © 2021 Andrew Tropin <andrew@trop.in>
19# 20#
@@ -1112,6 +1113,15 @@ cuirass-jobs: $(GOBJECTS)
1112.PHONY: clean-go make-go as-derivation authenticate 1113.PHONY: clean-go make-go as-derivation authenticate
1113.PHONY: update-guix-package update-NEWS cuirass-jobs release 1114.PHONY: update-guix-package update-NEWS cuirass-jobs release
1114 1115
1116# Git auto-configuration.
1117.git/hooks/pre-push: etc/git/pre-push
1118 cp etc/git/pre-push .git/hooks/pre-push
1119
1120.git/config: etc/git/gitconfig
1121 git config include.path ../etc/git/gitconfig
1122
1123nodist_noinst_DATA = .git/hooks/pre-push .git/config
1124
1115# Downloading up-to-date PO files. 1125# Downloading up-to-date PO files.
1116 1126
1117WEBLATE_REPO = https://framagit.org/tyreunom/guix-translations 1127WEBLATE_REPO = https://framagit.org/tyreunom/guix-translations
diff --git a/etc/git/gitconfig b/etc/git/gitconfig
index c9ebdc8fa88..831fbce6e79 100644
--- a/etc/git/gitconfig
+++ b/etc/git/gitconfig
@@ -1,5 +1,21 @@
1[commit]
2 gpgsign = true
3
1[diff "scheme"] 4[diff "scheme"]
2 xfuncname = "^(\\(define.*)$" 5 xfuncname = "^(\\(define.*)$"
3 6
4[diff "texinfo"] 7[diff "texinfo"]
5 xfuncname = "^@node[[:space:]]+([^,]+).*$" 8 xfuncname = "^@node[[:space:]]+([^,]+).*$"
9
10[format]
11 forceinbodyfrom = true # help preserve commit authorship
12 thread = shallow
13 useAutoBase = true
14
15[pull]
16 rebase = true
17
18[sendemail]
19 to = guix-patches@gnu.org
20 headerCmd = etc/teams.scm cc-members-header-cmd
21 thread = no