From 55246aac6717e86c14f31391ac903ed810d1a9a0 Mon Sep 17 00:00:00 2001 From: Michal Vitecek Date: Tue, 25 Sep 2007 16:38:46 +0200 Subject: Don't use "" for placeholders and suppress printing of empty user formats. This changes the interporate() to replace entries with NULL values by the empty string, and uses it to interpolate missing fields in custom format output used in git-log and friends. It is most useful to avoid output from %b format for a commit log message that lack any body text. Signed-off-by: Junio C Hamano --- commit.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'commit.c') diff --git a/commit.c b/commit.c index 99f65cee0e..c9a18180be 100644 --- a/commit.c +++ b/commit.c @@ -917,9 +917,6 @@ long format_commit_message(const struct commit *commit, const void *format, } if (msg[i]) table[IBODY].value = xstrdup(msg + i); - for (i = 0; i < ARRAY_SIZE(table); i++) - if (!table[i].value) - interp_set_entry(table, i, ""); do { char *buf = *buf_p; -- cgit v1.2.3