GNU bug report logs -
#64069
30.0.50; Mistyped shy group regexps
Previous Next
Reported by: Basil Contovounesios <contovob <at> tcd.ie>
Date: Wed, 14 Jun 2023 16:44:02 UTC
Severity: minor
Tags: patch
Found in version 30.0.50
Fixed in version 30.1
Done: Basil Contovounesios <contovob <at> tcd.ie>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 64069 <at> debbugs.gnu.org (full text, mbox):
Hi Basil,
On 14/06/2023 19:43, Basil Contovounesios wrote:
> - Dmitry to review the change in vc-git
> - Paul for any comments on the time handling in vc-git-annotate-time
>
> In vc-git-annotate-time, the mistyped group added in [1] throws off the
> match string indices that are later passed to encode-time: by my reading
> the hour argument by chance continues to be specified correctly, but the
> minutes argument receives the number of hours, the seconds argument the
> number of minutes, and the timezone argument the number of seconds.
>
> [1]: Display shorter dates in Git annotate output
> 576fba5f58d 2015-05-17 02:47:17 +0300
> https://git.sv.gnu.org/cgit/emacs.git/commit/?id=576fba5f58d
>
> Even after correcting the shy group, the timezone parsing doesn't seem
> right to me: encode-time expects a UTC offset in seconds, but is passed
> e.g. (string-to-number "+0100")=100s instead of the expected 1hr=3600s.
Thank you for the effort, but I think most of this nuance could be
simplified away.
When you say "encode-time ... is passed ... +0100", what is your testing
scenario?
IIUC, the change in commit 576fba5f58d removed the complex dates from
the output (which we parse), replacing them with the simple yyyy-mm-dd
format (that's what --date=short does). Seems like I tried (8 years ago)
to retain the compatibility with the previous output in case we'll make
the format configurable someday, but that still hasn't happened. So we
could do away with the 'if' condition and simplify the regexp accordingly.
This bug report was last modified 2 years and 25 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.