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

[PATCH] commit: more compact summary and without extra quotes

From
SBSanti Béjar <santi@agolina.net>
Date
Jan 19, 2009, 22:45 UTC
Message-ID
<1232405116-2359-1-git-send-email-santi@agolina.net>

Original: [master]: created d9a5491: "foo:bar"

While with the patch it becomes: [master d9a5491] foo:bar

As discussed in the git mailing list:
http://marc.info/?l=git&m=122765031208922&w=2
Signed-off-by: Santi Béjar <santi@agolina.net>
---
 builtin-commit.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/builtin-commit.c b/builtin-commit.c
index 2f0b00a..b159af2 100644
--- a/builtin-commit.c
+++ b/builtin-commit.c
@@ -883,7 +883,7 @@ static void print_summary(const char *prefix, const unsigned char *sha1)
 {
 	struct rev_info rev;
 	struct commit *commit;
-	static const char *format = "format:%h: \"%s\"";
+	static const char *format = "format:%h] %s";
 	unsigned char junk_sha1[20];
 	const char *head = resolve_ref("HEAD", junk_sha1, 0, NULL);
 
@@ -910,7 +910,7 @@ static void print_summary(const char *prefix, const unsigned char *sha1)
 	rev.diffopt.break_opt = 0;
 	diff_setup_done(&rev.diffopt);
 
-	printf("[%s%s]: created ",
+	printf("[%s%s ",
 		!prefixcmp(head, "refs/heads/") ?
 			head + 11 :
 			!strcmp(head, "HEAD") ?
-- 
1.6.1.258.g7ff14
Next: Johannes Schindelin
Message 1 of 8 in “commit: more compact summary and without extra quotes”
  1. commit: more compact summary and without extra quotesSanti Béjar, Jan 19, 2009
  2. Johannes SchindelinJan 19, 2009
  3. Santi BéjarJan 20, 2009
  4. Junio C HamanoJan 20, 2009
  5. Johannes SchindelinJan 20, 2009
  6. Santi BéjarJan 20, 2009
  7. Jeff KingJan 20, 2009
  8. Junio C HamanoJan 20, 2009

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.