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

[PATCH 4/3] Rename --pretty=changelog to --pretty=gnucl, and fix a bug

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Feb 28, 2007, 01:58 UTC
Message-ID
<Pine.LNX.4.63.0702280258200.22628@wbgn013.biozentrum.uni-wuerzburg.de>
In-Reply-To
<Pine.LNX.4.63.0702271621120.22628@wbgn013.biozentrum.uni-wuerzburg.de>

It was pointed out that this format is rather specific. So, rename it to "gnucl".

Also fix a bug where it would crash with an empty commit message.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 Documentation/pretty-formats.txt |   10 ++++++++++
 commit.c                         |    2 +-
 diff.c                           |    2 ++
 3 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt
index 2fe6c31..f9ce4fb 100644
--- a/Documentation/pretty-formats.txt
+++ b/Documentation/pretty-formats.txt
@@ -77,6 +77,16 @@ displayed in full, regardless of whether --abbrev or
 true parent commits, without taking grafts nor history
 simplification into account.
 
+	* 'gnucl'
++
+--------------------------------------------------------------
+2007-02-22  Simon Josefsson <simon@josefsson.org>
+
+    * link-warning.h, gl/getaddrinfo.c, gl/gnulib.mk,
+         gl/string_.h, lgl/m4/unistd_h.m4: Update.
+--------------------------------------------------------------
+
+
 	* 'format:'
 +
 The 'format:' format allows you to specify which information
diff --git a/commit.c b/commit.c
index 64ddb56..abd84a8 100644
--- a/commit.c
+++ b/commit.c
@@ -38,7 +38,7 @@ struct cmt_fmt_map {
 	{ "fuller",	5,	CMIT_FMT_FULLER },
 	{ "oneline",	1,	CMIT_FMT_ONELINE },
 	{ "format:",	7,	CMIT_FMT_USERFORMAT},
-	{ "changelog",	9,	CMIT_FMT_CHANGELOG}
+	{ "gnucl",	1,	CMIT_FMT_CHANGELOG}
 };
 
 static char *user_format;
diff --git a/diff.c b/diff.c
index aed5388..f2d162f 100644
--- a/diff.c
+++ b/diff.c
@@ -1892,6 +1892,8 @@ static void run_changelog(struct diff_filepair *p, struct diff_options *o,
 static void finalize_changelog(struct diff_options *options,
 		struct changelog_t *changelog)
 {
+	if (!options->stat_sep)
+		return;
 	changelog->offset = print_wrapped_text(": ", -changelog->offset,
 		CHANGELOG_TAB_SIZE + 2, CHANGELOG_WIDTH);
 	changelog->offset = print_wrapped_text(options->stat_sep,
-- 
1.5.0.2.778.g534f-dirty
Previous: Junio C HamanoNext: Nicolas Pitre
Message 6 of 24 in “Add --pretty=changelog”
  1. Add --pretty=changelogJohannes Schindelin, Feb 27, 2007
  2. Nicolas PitreFeb 27, 2007
  3. Johannes SchindelinFeb 27, 2007
  4. Eric WongFeb 27, 2007
  5. Junio C HamanoFeb 27, 2007
  6. 4/3 Rename --pretty=changelog to --pretty=gnucl, and fix a bugJohannes Schindelin, Feb 28, 2007
  7. Nicolas PitreFeb 28, 2007
  8. --amend Rename --pretty=changelog to --pretty=gnuclJohannes Schindelin, Feb 28, 2007
  9. Junio C HamanoMar 2, 2007
  10. print_wrapped_text: fix output for negative indentJohannes Schindelin, Mar 2, 2007
  11. --pretty=gnucl: avoid line wrapping before the commaJohannes Schindelin, Mar 2, 2007
  12. Junio C HamanoMar 3, 2007
  13. Johannes SchindelinMar 3, 2007
  14. Junio C HamanoMar 3, 2007
  15. Simon JosefssonMar 1, 2007
  16. Johannes SchindelinMar 1, 2007
  17. Shawn O. PearceMar 1, 2007
  18. Johannes SchindelinMar 1, 2007
  19. Junio C HamanoMar 2, 2007
  20. Simon JosefssonMar 2, 2007
  21. Junio C HamanoMar 2, 2007
  22. Simon JosefssonMar 2, 2007
  23. Johannes SchindelinMar 2, 2007
  24. Simon JosefssonMar 3, 2007

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.