git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Michal Vitecek <fuf@mageo.cz>
To: git@vger.kernel.org
Subject: [PATCH] Use "" instead of "<unknown>" for placeholders [was Re: [PATCH] Added a new placeholder '%cm' for full commit message]
Date: Fri, 21 Sep 2007 16:05:00 +0200	[thread overview]
Message-ID: <20070921140500.GB9072@mageo.cz> (raw)
In-Reply-To: <Pine.LNX.4.64.0709211207070.28395@racer.site>

Johannes Schindelin wrote:
>On Fri, 21 Sep 2007, Michal Vitecek wrote:
>> Johannes Schindelin wrote:
>> >On Fri, 21 Sep 2007, Michal Vitecek wrote:
>> >
>> >> I have added a new placeholder '%cm' for a full commit message.
>> >
>> >You mean the raw message, including the headers?  Why not use "%r" for 
>> >that?
>> 
>>  No, sorry for the incorrect term. I meant the whole commit message
>>  (subject + 2*\n + body).
>
>Ah, makes sense.  In that case, "%M" maybe?

 I think it's no longer needed if instead of "<undefined>" only "" will
 be substituted.

>> >> I made it because I want to use my own pretty format which currently 
>> >> only allows '%s' for subject and '%b' for body. But '%b' is 
>> >> substituted with <undefined> if the body is "missing" which I 
>> >> obviously don't like :)
>> >
>> >Then you should fix %b not to show "<undefined>".
>> 
>>  I'll do it if it is okay. Shall I do the same for the other
>>  placeholders as well?
>
>Yeah.  Don't know why I did it that way.

 Here comes the big patch :)


>From 2e4ba4e73bbcd19558039dd85fe45c7bbe7fd1c4 Mon Sep 17 00:00:00 2001
From: Michal Vitecek <fuf@mageo.cz>
Date: Fri, 21 Sep 2007 14:40:37 +0200
Subject: [PATCH] Use "" instead of "<unknown>" for placeholders

---
 commit.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/commit.c b/commit.c
index 99f65ce..7e90bc1 100644
--- a/commit.c
+++ b/commit.c
@@ -919,7 +919,7 @@ long format_commit_message(const struct commit *commit, const void *format,
 		table[IBODY].value = xstrdup(msg + i);
 	for (i = 0; i < ARRAY_SIZE(table); i++)
 		if (!table[i].value)
-			interp_set_entry(table, i, "<unknown>");
+			interp_set_entry(table, i, "");
 
 	do {
 		char *buf = *buf_p;
-- 
1.5.3.1

-- 
		fuf		(fuf@mageo.cz)

  reply	other threads:[~2007-09-21 14:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-21 10:14 [PATCH] Added a new placeholder '%cm' for full commit message Michal Vitecek
2007-09-21 10:47 ` Johannes Schindelin
2007-09-21 11:06   ` Michal Vitecek
2007-09-21 11:08     ` Johannes Schindelin
2007-09-21 14:05       ` Michal Vitecek [this message]
2007-09-21 20:12         ` [PATCH] Use "" instead of "<unknown>" for placeholders Junio C Hamano
2007-09-21 20:41           ` Johannes Schindelin
2007-09-22  8:53           ` Michal Vitecek
2007-09-25  9:43             ` Michal Vitecek
2007-09-25 10:25               ` Johannes Schindelin
2007-09-25 10:52                 ` Michal Vitecek
2007-09-25 12:46                 ` Johannes Schindelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070921140500.GB9072@mageo.cz \
    --to=fuf@mageo.cz \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).