[PATCH] etc: copyright.el: Respect git setting for name and email.

  • Done
  • quality assurance status badge
Details
One participant
  • Tomas Volf
Owner
unassigned
Submitted by
Tomas Volf
Severity
normal

Debbugs page

Tomas Volf wrote 1 years ago
(address . guix-patches@gnu.org)(name . Tomas Volf)(address . ~@wolfsden.cz)
ee71fcaa85a69a2b8fac55032d0f847da1839f2b.1704752436.git.~@wolfsden.cz
Users might want to use different identity for their global emacs config and
for the Guix repository. In case they differ, there seems to be little reason
not to prefer the git's setting. Assuming magit is available, use the
user.name and user.email, with fallback to user-full-name and
user-mail-address respectively.

* etc/copyright.el (guix-copyright): Use git's user.name and user.email if
available.

Change-Id: Iad1c07681b38beeebf0feeda18702258ffb5d918
---
etc/copyright.el | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

Toggle diff (21 lines)
diff --git a/etc/copyright.el b/etc/copyright.el
index f5ed723cea..fdd67535d9 100644
--- a/etc/copyright.el
+++ b/etc/copyright.el
@@ -28,7 +28,11 @@
"FULL_NAME <MAIL_ADDRESS>: "
comment-start
";; Copyright © " `(format-time-string "%Y") " "
- (or (format "%s <%s>" user-full-name user-mail-address) str)
+ '(setq v1 (or (and (featurep 'magit) (magit-get "user.name"))
+ (user-full-name)))
+ '(setq v2 (or (and (featurep 'magit) (magit-get "user.email"))
+ (user-mail-address)))
+ (or (format "%s <%s>" v1 v2) str)
comment-end)
;;; copyright.el ends here

base-commit: b212e6934643e085f168a5364cb593f61aa616ba
--
2.41.0
Tomas Volf wrote 5 months ago
control message for bug #68335
(address . control@debbugs.gnu.org)
ac8077347fa6ad220df7e2fa22a83ecb@wolfsden.cz
close 68335
quit
?
Your comment

This issue is archived.

To comment on this conversation send an email to 68335@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 68335
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help