[Whonix-devel] git log --pretty="format:%H$t%aN$t%s$t%G?" --show-signature

Mike Gerwitz mikegerwitz at gnu.org
Thu Dec 4 19:05:38 CET 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hey Patrick,

On Thu, Dec 04, 2014 at 17:21:06 +0000, Patrick Schleizer wrote:
> git log --pretty="format:%H$t%aN$t%s$t%G?" --show-signature
> [...]
> But when I run that command, spaces are missing. (Using a user that does
> not know my gpg public key for testing purposes.) See output:
>
> -----
>
> user2 at host:/home/user/testrepo$ git log
> --pretty="format:%H$t%aN$t%s$t%G?" --show-signature

That is because the variable `$t' is defined in my script on the
preceding line, as a tab character.  You can insert it directly using
C-V <TAB>, or $'\t' in bash.

> Mike, could you please put your various git commit verification helper
> scripts into a publicly visible?

You can use this:

  https://gitorious.org/easejs/easejs/source/ee85b058df783ffaa9f8d5ae58f9eb6d7586b0ca:tools/signchk

But note that the default value of the `chkafter' var is
ease.js-specific.

> By the way, any chance that these useful helper scripts could make their
> way into the official distribution of git as a stopgap until native git
> commit verification support gets improved?

It has since improved; I'm looking for the time to update the article,
or write a follow-up.

Git has since added other pretty formatting options as well:

  https://github.com/git/git/blob/master/Documentation/pretty-formats.txt#L140

Git v2.1.0 also added a `verify-commit' command:

  https://github.com/git/git/blob/master/Documentation/git-verify-commit.txt

I haven't used it yet.

Hope that helps.

- -- 
Mike Gerwitz
Free Software Hacker | GNU Maintainer
http://mikegerwitz.com
FSF Member #5804 | GPG Key ID: 0x8EE30EAB
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBAgAGBQJUgKJyAAoJEPIruBWO4w6rdS8QAMEtQhklDe4zXju0uc6ksqYl
aXdXhE7HcyUDl6yWXEheXH4oCRLSthS+8MPQfuY8gae1eRvyHx3rViGpMEyB8s5B
xhAQpOLVmro0QIwIZ/HGX4IKoGVq/QyqvLNR8iqnV8GXPu+ckGIG/UvrkFFSaLW8
eFUvQLbNITViVgQljCzzfptL9dQvdra0D1EXxRk8+h8Sw4vKRN54h0tqKVw5PcsT
4sFUBVwgmzILNKydFkMu1C+pDwnemhS04PtcrpmUTniOzLPhWJiZwzgDV5j9tOPq
7noLrnw0kpm6PbX90i2+uSVGmh6zgoR69h7SAZGJEiHQj4BiZetLMwxJL25o73/c
1/9tWT/7kAcpvzAjPjRMS3BqV7AVwNqTKKblCszfunS87aWLs1t/bgUg4e6x3lTJ
JxyxkKnSnn3dzntMfB9UuuJ6bdtn1pJci4Ptvl2yzKHaZv7ImV78UIuxdthtMgMn
eBawq3wm7HBMETkDDyRSpuPOEycBSnWZL2dL4Xc9IxPKDTJUvHTRUXxy4v2Juiv9
Pogao25j6EpTlOqx29Y9Y95ITw/UdQU7NjPAGFNxIZZTgjzHrcIlaEKuoHp+t6oh
s8OPhD+FMNWBFdAda+zP785sUbyF93/2xBK/HFyTUinOLn1/BJBC0FqHfeYd1hQe
cJ0rYnOtckycQv+re9hz
=+Rub
-----END PGP SIGNATURE-----


More information about the Whonix-devel mailing list