Skip to content

Commit

Permalink
pretty printing: extend %G? to include 'N' and 'U'
Browse files Browse the repository at this point in the history
Expand %G? in pretty format strings to 'N' in case of no GPG signature
and 'U' in case of a good but untrusted GPG signature in addition to
the previous 'G'ood and 'B'ad. This eases writing anyting parsing
git-log output.

Signed-off-by: Sebastian Götte <jaseg@physik-pool.tu-berlin.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Sebastian Götte authored and gitster committed Apr 1, 2013
1 parent eb307ae commit e290c4b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Documentation/pretty-formats.txt
Expand Up @@ -131,7 +131,8 @@ The placeholders are:
- '%B': raw body (unwrapped subject and body)
- '%N': commit notes
- '%GG': raw verification message from GPG for a signed commit
- '%G?': show either "G" for Good or "B" for Bad for a signed commit
- '%G?': show "G" for a Good signature, "B" for a Bad signature, "U" for a good,
untrusted signature and "N" for no signature
- '%GS': show the name of the signer for a signed commit
- '%GK': show the key used to sign a signed commit
- '%gD': reflog selector, e.g., `refs/stash@{1}`
Expand Down
2 changes: 2 additions & 0 deletions pretty.c
Expand Up @@ -1145,6 +1145,8 @@ static size_t format_commit_one(struct strbuf *sb, const char *placeholder,
switch (c->signature_check.result) {
case 'G':
case 'B':
case 'U':
case 'N':
strbuf_addch(sb, c->signature_check.result);
}
break;
Expand Down

0 comments on commit e290c4b

Please sign in to comment.