git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git log --pretty="format:%H$t%aN$t%s$t%G?" --show-signature

From
MGMike Gerwitz <mikegerwitz@gnu.org>
Date
Dec 4, 2014, 18:05 UTC
Message-ID
<871tofuw7h.fsf@gnu.org>
In-Reply-To
<54809802.6030609@whonix.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hey Patrick,
On Thu, Dec 04, 2014 at 17:21:06 +0000, Patrick Schleizer wrote:
Show 9 quoted lines
> 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@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-----

Previous: Patrick SchleizerNext: Patrick Schleizer
Message 2 of 5 in “git log --pretty="format:%H$t%aN$t%s$t%G?" --show-signature”
  1. Patrick SchleizerDec 4, 2014
  2. Mike GerwitzDec 4, 2014
  3. Patrick SchleizerDec 4, 2014
  4. Junio C HamanoDec 4, 2014
  5. Mike GerwitzDec 6, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.