GNU bug report logs -
#59414
29.0.50; Have vc-git-expanded-log-entry pass --stat
Previous Next
Reported by: Sean Whitton <spwhitton <at> spwhitton.name>
Date: Sun, 20 Nov 2022 17:36:01 UTC
Severity: normal
Found in version 29.0.50
Done: Sean Whitton <spwhitton <at> spwhitton.name>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: Sean Whitton <spwhitton <at> spwhitton.name>
> Date: Sun, 04 Dec 2022 15:57:52 -0700
>
> @@ -1340,16 +1348,16 @@ vc-git-print-log
>
> (defun vc-git-log-outgoing (buffer remote-location)
> (vc-setup-buffer buffer)
> - (vc-git-command
> - buffer 'async nil
> - "log"
> - "--no-color" "--graph" "--decorate" "--date=short"
> - (format "--pretty=tformat:%s" (car vc-git-root-log-format))
> - "--abbrev-commit"
> - (concat (if (string= remote-location "")
> - "@{upstream}"
> - remote-location)
> - "..HEAD")))
> + (apply #'vc-git-command buffer 'async nil
> + `("log"
> + "--no-color" "--graph" "--decorate" "--date=short"
> + ,(format "--pretty=tformat:%s" (car vc-git-root-log-format))
> + "--abbrev-commit"
> + ,@(ensure-list vc-git-shortlog-switches)
> + ,(concat (if (string= remote-location "")
> + "@{upstream}"
> + remote-location)
> + "..HEAD"))))
Why the change from vc-git-command to 'apply'? The former took care for
setting up the I/O encoding for the Git command, while the latter just uses
the process defaults, which are not necessarily right for the underlying
system and locale.
In general, I'd prefer that invocations of all the Git commands went through
a single function, so that we could make sure the encoding/decoding stuff,
which is entirely non-trivial with Git, is done correctly in a single place
that is easy to audit and maintain. I know that not all the commands are
invoked through there, but making more of them do so is going in the
direction that is 180° opposite to what we should strive to.
Thanks.
This bug report was last modified 2 years and 246 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.