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

8 messages from 2009-01-19 to 2009-01-20. Participants: Santi Béjar, Johannes Schindelin, Junio C Hamano, Jeff King.
Thread: https://gitlist.dev/t/17258

## Santi Béjar, 2009-01-19 22:45

Subject: [PATCH] commit: more compact summary and without extra quotes
Message-ID: <1232405116-2359-1-git-send-email-santi@agolina.net>
URL: https://gitlist.dev/e/1232405116-2359-1-git-send-email-santi%40agolina.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

```

## Johannes Schindelin, 2009-01-19 23:46

Subject: Re: [PATCH] commit: more compact summary and without extra quotes
Message-ID: <alpine.DEB.1.00.0901200043400.3586@pacific.mpi-cbg.de>
URL: https://gitlist.dev/e/alpine.DEB.1.00.0901200043400.3586%40pacific.mpi-cbg.de
In-Reply-To: <1232405116-2359-1-git-send-email-santi@agolina.net>

```
Hi,

On Mon, 19 Jan 2009, Santi Béjar wrote:

> Original:
> [master]: created d9a5491: "foo:bar"
> 
> While with the patch it becomes:
> [master d9a5491] foo:bar

Maybe you want to mention that it saves screen estate.  After all, the 
commit message is _the_ place to relate your motivation to the gentle 
reader.

> 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>
> ---

You really want to move the link after the ---.  I often read commit 
messages off-line, and let me tell you: I am not really happy reading 
links then.  Not at all.

Ciao,
Dscho
```

## Santi Béjar, 2009-01-20 00:00

Subject: Re: [PATCH] commit: more compact summary and without extra quotes
Message-ID: <adf1fd3d0901191600k6fd7a364h3e55f9600960df03@mail.gmail.com>
URL: https://gitlist.dev/e/adf1fd3d0901191600k6fd7a364h3e55f9600960df03%40mail.gmail.com
In-Reply-To: <alpine.DEB.1.00.0901200043400.3586@pacific.mpi-cbg.de>

```
2009/1/20 Johannes Schindelin <Johannes.Schindelin@gmx.de>:
> Hi,
>
> On Mon, 19 Jan 2009, Santi Béjar wrote:
>
>> Original:
>> [master]: created d9a5491: "foo:bar"
>>
>> While with the patch it becomes:
>> [master d9a5491] foo:bar
>
> Maybe you want to mention that it saves screen estate.  After all, the
> commit message is _the_ place to relate your motivation to the gentle
> reader.

I thought it was enough with the "more compact" in the title line.

>
>> 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>
>> ---
>
> You really want to move the link after the ---.  I often read commit
> messages off-line, and let me tell you: I am not really happy reading
> links then.  Not at all.

OK, less work for me :-)

Santi

```

## Junio C Hamano, 2009-01-20 03:49

Subject: Re: [PATCH] commit: more compact summary and without extra quotes
Message-ID: <7vocy2ocw0.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vocy2ocw0.fsf%40gitster.siamese.dyndns.org
In-Reply-To: <adf1fd3d0901191600k6fd7a364h3e55f9600960df03@mail.gmail.com>

```
Santi Béjar <santi@agolina.net> writes:

>>> 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>
>>> ---
>>
>> You really want to move the link after the ---.  I often read commit
>> messages off-line, and let me tell you: I am not really happy reading
>> links then.  Not at all.
>
> OK, less work for me :-)

I do not mind URL in the commit log; it would help me or other forgetful
people three months from now if we need to go back to the original
discussion.

I however agree with Dscho that it is irritating when somebody uses URL to
avoid summarizing the issue himself.  If somebody cares enough and
understands the issues discussed at URL to come up with a patch that is
worth applying, he surely should be able to summarize the primary idea and
issues involved in a few paragraphs.

A summary of discussion in addition to URL would save everybody's time.

```

## Jeff King, 2009-01-20 04:14

Subject: Re: [PATCH] commit: more compact summary and without extra quotes
Message-ID: <20090120041443.GC30714@sigill.intra.peff.net>
URL: https://gitlist.dev/e/20090120041443.GC30714%40sigill.intra.peff.net
In-Reply-To: <1232405116-2359-1-git-send-email-santi@agolina.net>

```
On Mon, Jan 19, 2009 at 11:45:16PM +0100, Santi Béjar wrote:

> 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

I agree with Junio that the URL is fine, but it should not _replace_ a
summary of the issue. But as for the patch itself, I think it is
sensible (and I remember wondering at some point what had become of your
proposal, since everybody seemed to like it).

-Peff

```

## Junio C Hamano, 2009-01-20 07:04

Subject: Re: [PATCH] commit: more compact summary and without extra quotes
Message-ID: <7vtz7ulaq5.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vtz7ulaq5.fsf%40gitster.siamese.dyndns.org
In-Reply-To: <1232405116-2359-1-git-send-email-santi@agolina.net>

```
I've updated the log message, so there is no need to resend.  I suspect
that documentation/tutorial needs updating after this one.

Will apply to 'master'.  Thanks.

```

## Johannes Schindelin, 2009-01-20 10:10

Subject: Re: [PATCH] commit: more compact summary and without extra quotes
Message-ID: <alpine.DEB.1.00.0901201109430.3586@pacific.mpi-cbg.de>
URL: https://gitlist.dev/e/alpine.DEB.1.00.0901201109430.3586%40pacific.mpi-cbg.de
In-Reply-To: <7vocy2ocw0.fsf@gitster.siamese.dyndns.org>

```
Hi,

On Mon, 19 Jan 2009, Junio C Hamano wrote:

> Santi Béjar <santi@agolina.net> writes:
> 
> > OK, less work for me :-)
> 
> A summary of discussion in addition to URL would save everybody's time.

As Santi pointed out, not his time.  And I almost feared that he was 
comfortable with the overall time-balance weighing dramatically in his 
favor.

Ciao,
Dscho

```

## Santi Béjar, 2009-01-20 10:29

Subject: Re: [PATCH] commit: more compact summary and without extra quotes
Message-ID: <adf1fd3d0901200229h4e7a422j9418a8d399e50931@mail.gmail.com>
URL: https://gitlist.dev/e/adf1fd3d0901200229h4e7a422j9418a8d399e50931%40mail.gmail.com
In-Reply-To: <alpine.DEB.1.00.0901201109430.3586@pacific.mpi-cbg.de>

```
2009/1/20 Johannes Schindelin <Johannes.Schindelin@gmx.de>:
> Hi,
>
> On Mon, 19 Jan 2009, Junio C Hamano wrote:
>
>> Santi Béjar <santi@agolina.net> writes:
>>
>> > OK, less work for me :-)
>>
>> A summary of discussion in addition to URL would save everybody's time.
>
> As Santi pointed out, not his time.  And I almost feared that he was
> comfortable with the overall time-balance weighing dramatically in his
> favor.

No, I'm not comfortable. I don't like wasting other's time. It was an
unfortunate comment from my part (I thought you were saying just
remove or put it after the ---).

Santi

```
