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

Re: Display a commit in red if it is not signed.

From
Jeff King <peff@peff.net>
Date
Oct 2, 2018, 14:46 UTC
Message-ID
<20181002144639.GC24480@sigill.intra.peff.net>
In-Reply-To
<CAGiqTF47fu85XCFnEbfMEF96v6U=N_Ferr56qAji4eLuBpyxjg@mail.gmail.com>
On Tue, Oct 02, 2018 at 11:26:19AM +0200, Jayesh Badwaik wrote:
> Is there a way to create git pretty format that sets the color to one
> color (say red) only when the commit is unsigned or the signature
> cannot be verified?

Not currently. There are placeholders to show the signing information (e.g., %G?). But the log --format language does not yet have any kind of conditional, and I think you'd want something like "if G? is 'G', then show this color".

The for-each-ref format language does have this. We'd like to unify them in the long run, but it hasn't happened yet.

-Peff
Previous: Jayesh Badwaik
Message 2 of 2 in “Display a commit in red if it is not signed.”
  1. Jayesh BadwaikOct 2, 2018
  2. Jeff KingOct 2, 2018

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.