GNU bug report logs - #68335
[PATCH] etc: copyright.el: Respect git setting for name and email.

Previous Next

Package: guix-patches;

Reported by: Tomas Volf <~@wolfsden.cz>

Date: Mon, 8 Jan 2024 22:22:02 UTC

Severity: normal

Tags: patch

Done: Tomas Volf <~@wolfsden.cz>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 68335 in the body.
You can then email your comments to 68335 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#68335; Package guix-patches. (Mon, 08 Jan 2024 22:22:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tomas Volf <~@wolfsden.cz>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 08 Jan 2024 22:22:02 GMT) Full text and rfc822 format available.

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

From: Tomas Volf <~@wolfsden.cz>
To: guix-patches <at> gnu.org
Cc: Tomas Volf <~@wolfsden.cz>
Subject: [PATCH] etc: copyright.el: Respect git setting for name and email.
Date: Mon,  8 Jan 2024 23:20:36 +0100
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(-)

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





bug closed, send any further explanations to 68335 <at> debbugs.gnu.org and Tomas Volf <~@wolfsden.cz> Request was from Tomas Volf <~@wolfsden.cz> to control <at> debbugs.gnu.org. (Sun, 06 Oct 2024 16:18:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 04 Nov 2024 12:24:11 GMT) Full text and rfc822 format available.

This bug report was last modified 244 days ago.

Previous Next


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