bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#40248: 27.0.90; Failure open .authinfo.gpg from Gnus


From: Juri Linkov
Subject: bug#40248: 27.0.90; Failure open .authinfo.gpg from Gnus
Date: Thu, 23 Jul 2020 03:20:44 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

>> That sounds like a very useful thing to have.  How do you make vc-mode
>> (etc) show both dates?
>
> You don't need to tell VC anything, just say in your ~/.gitconfig
>
>   [format]
>         pretty = fuller

This setting breaks vc-git-log-view-mode: typing 'D' in the log buffer
with "CommitDate" throws the error:

  fatal: bad revision 'Date'

This is because it searches for the commit number and finds "CommitDate"
as in this example:

  commit 365e01cc9f64ce6ca947ccfd8612d60763280a37
  CommitDate: 2020-01-01 00:59:52 +0000

The problem is that 'vc-git-log-view-mode' sets 'log-view-message-re'
to this regexp:

  "^commit *\\([0-9a-z]+\\)"

where "\\([0-9a-z]+\\)" matches "Date" in "CommitDate".

This patch fixes it, but I'm not sure if this is the correct regexp
for git commits:

diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index 9b8151705f..2220a33188 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -1241,7 +1241,7 @@ vc-git-log-view-mode
   (set (make-local-variable 'log-view-message-re)
        (if (not (memq vc-log-view-type '(long log-search with-diff)))
           (cadr vc-git-root-log-format)
-        "^commit *\\([0-9a-z]+\\)"))
+        "^commit +\\([0-9a-z]+\\)"))
   ;; Allow expanding short log entries.
   (when (memq vc-log-view-type '(short log-outgoing log-incoming mergebase))
     (setq truncate-lines t)






reply via email to

[Prev in Thread] Current Thread [Next in Thread]