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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>
---
 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@xxxxxxxxxxxxx>
+
+    * 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


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]