All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 4/4] pretty printing: extend %G? to include 'N' and 'U'
@ 2013-03-23  1:57 Sebastian Götte
  0 siblings, 0 replies; only message in thread
From: Sebastian Götte @ 2013-03-23  1:57 UTC (permalink / raw)
  To: git; +Cc: gitster

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>
---
 Documentation/pretty-formats.txt | 3 ++-
 pretty.c                         | 2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt
index 105f18a..69bd77a 100644
--- a/Documentation/pretty-formats.txt
+++ b/Documentation/pretty-formats.txt
@@ -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
 - '%gD': reflog selector, e.g., `refs/stash@{1}`
 - '%gd': shortened reflog selector, e.g., `stash@{1}`
diff --git a/pretty.c b/pretty.c
index 0547df1..875a1db 100644
--- a/pretty.c
+++ b/pretty.c
@@ -1136,6 +1136,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;
-- 
1.8.1.5

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-03-23  1:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-23  1:57 [PATCH v2 4/4] pretty printing: extend %G? to include 'N' and 'U' Sebastian Götte

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.