* Extra pair of double quotes in "git commit" output?
@ 2008-11-25 21:49 Nanako Shiraishi
2008-11-25 22:02 ` Junio C Hamano
2008-11-25 23:25 ` Jeff King
0 siblings, 2 replies; 7+ messages in thread
From: Nanako Shiraishi @ 2008-11-25 21:49 UTC (permalink / raw)
To: git
While I think the way recent "git commit" displays the commit you just created is very helpful, I often find the double quotes around the message unnecessary and sometimes even confusing. I just made a commit and saw this message:
[master]: created d9a5491: "Show "standard deviation" column in table 3"
The colon after the shortened commit SHA1 is enough to signal that it will talk about a different piece of information on the rest of the line. I think the extra double quotes can be dropped safely:
[master]: created d9a5491: Show "standard deviation" column in table 3
and it will make the output shorter by two columns, more pretty, and does not lose the clarity.
--
Nanako Shiraishi
http://ivory.ap.teacup.com/nanako3/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Extra pair of double quotes in "git commit" output?
2008-11-25 21:49 Extra pair of double quotes in "git commit" output? Nanako Shiraishi
@ 2008-11-25 22:02 ` Junio C Hamano
2008-11-25 23:25 ` Jeff King
1 sibling, 0 replies; 7+ messages in thread
From: Junio C Hamano @ 2008-11-25 22:02 UTC (permalink / raw)
To: Nanako Shiraishi; +Cc: git
Nanako Shiraishi <nanako3@lavabit.com> writes:
> While I think the way recent "git commit" displays the commit you just created is very helpful, I often find the double quotes around the message unnecessary and sometimes even confusing. I just made a commit and saw this message:
>
> [master]: created d9a5491: "Show "standard deviation" column in table 3"
>
> The colon after the shortened commit SHA1 is enough to signal that it will talk about a different piece of information on the rest of the line. I think the extra double quotes can be dropped safely:
>
> [master]: created d9a5491: Show "standard deviation" column in table 3
>
> and it will make the output shorter by two columns, more pretty, and does not lose the clarity.
[offtopic. Please wrap your text at a reasonable width around 70 columns]
Like this?
It might break some existing tests (I didn't check), but I think that is a
sensible thing to do.
builtin-commit.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git c/builtin-commit.c w/builtin-commit.c
index 591d16b..654bfbe 100644
--- c/builtin-commit.c
+++ w/builtin-commit.c
@@ -881,7 +881,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);
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: Extra pair of double quotes in "git commit" output?
2008-11-25 21:49 Extra pair of double quotes in "git commit" output? Nanako Shiraishi
2008-11-25 22:02 ` Junio C Hamano
@ 2008-11-25 23:25 ` Jeff King
2008-11-26 0:06 ` Santi Béjar
1 sibling, 1 reply; 7+ messages in thread
From: Jeff King @ 2008-11-25 23:25 UTC (permalink / raw)
To: Nanako Shiraishi; +Cc: git
On Wed, Nov 26, 2008 at 06:49:06AM +0900, Nanako Shiraishi wrote:
> While I think the way recent "git commit" displays the commit you just
> created is very helpful, I often find the double quotes around the
> message unnecessary and sometimes even confusing. I just made a
> commit and saw this message:
>
> [master]: created d9a5491: "Show "standard deviation" column in table 3"
While I do think that typographically the embedded quotes look awful, I
find that the quotes do help separate the commit subject from the other
text when there are colons in the subject. IOW, I think that
[master]: created d9a5491: foo: bar
is harder to read than
[master]: created d9a5491: "foo: bar"
And 47% of commits in git.git have a colon (only 7% have a double
quote).
So I sympathize with the desire to remove the quotes, as they look bad
and are obviously not too rare. But I'd like to find a solution which
maintains a better visual separation between the subject and the other
text than simply removing them.
-Peff
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Extra pair of double quotes in "git commit" output?
2008-11-25 23:25 ` Jeff King
@ 2008-11-26 0:06 ` Santi Béjar
2008-11-26 13:34 ` Jeff King
0 siblings, 1 reply; 7+ messages in thread
From: Santi Béjar @ 2008-11-26 0:06 UTC (permalink / raw)
To: Jeff King; +Cc: Nanako Shiraishi, git
On Wed, Nov 26, 2008 at 12:25 AM, Jeff King <peff@peff.net> wrote:
[...]
>
> So I sympathize with the desire to remove the quotes, as they look bad
> and are obviously not too rare. But I'd like to find a solution which
> maintains a better visual separation between the subject and the other
> text than simply removing them.
Maybe just use the output of "git branch -v":
master d9a5491 foo: bar
or even literally:
* master d9a5491 [ahead 1] foo: bar
or to make the separation more evident:
[master d9a5491] foo: bar
Santi
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Extra pair of double quotes in "git commit" output?
2008-11-26 0:06 ` Santi Béjar
@ 2008-11-26 13:34 ` Jeff King
2008-11-26 15:07 ` Jakub Narebski
2008-11-26 17:15 ` David Brown
0 siblings, 2 replies; 7+ messages in thread
From: Jeff King @ 2008-11-26 13:34 UTC (permalink / raw)
To: Santi Béjar; +Cc: Nanako Shiraishi, git
On Wed, Nov 26, 2008 at 01:06:34AM +0100, Santi Béjar wrote:
> Maybe just use the output of "git branch -v":
>
> master d9a5491 foo: bar
>
> or even literally:
>
> * master d9a5491 [ahead 1] foo: bar
>
> or to make the separation more evident:
>
> [master d9a5491] foo: bar
Out of those suggestions, I find only the final one aesthetically
acceptable. Nobody else has weighed in, so maybe they don't care. Or
maybe they are just on vacation due to the (American) holiday.
-Peff
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Extra pair of double quotes in "git commit" output?
2008-11-26 13:34 ` Jeff King
@ 2008-11-26 15:07 ` Jakub Narebski
2008-11-26 17:15 ` David Brown
1 sibling, 0 replies; 7+ messages in thread
From: Jakub Narebski @ 2008-11-26 15:07 UTC (permalink / raw)
To: git
Jeff King wrote:
> On Wed, Nov 26, 2008 at 01:06:34AM +0100, Santi Béjar wrote:
>
>> Maybe just use the output of "git branch -v":
>>
>> master d9a5491 foo: bar
>>
>> or even literally:
>>
>> * master d9a5491 [ahead 1] foo: bar
>>
>> or to make the separation more evident:
>>
>> [master d9a5491] foo: bar
>
> Out of those suggestions, I find only the final one aesthetically
> acceptable. Nobody else has weighed in, so maybe they don't care. Or
> maybe they are just on vacation due to the (American) holiday.
+1 for the last one.
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Extra pair of double quotes in "git commit" output?
2008-11-26 13:34 ` Jeff King
2008-11-26 15:07 ` Jakub Narebski
@ 2008-11-26 17:15 ` David Brown
1 sibling, 0 replies; 7+ messages in thread
From: David Brown @ 2008-11-26 17:15 UTC (permalink / raw)
To: Jeff King; +Cc: Santi Béjar, Nanako Shiraishi, git
On Wed, Nov 26, 2008 at 08:34:23AM -0500, Jeff King wrote:
>> or to make the separation more evident:
>>
>> [master d9a5491] foo: bar
>
>Out of those suggestions, I find only the final one aesthetically
>acceptable. Nobody else has weighed in, so maybe they don't care. Or
>maybe they are just on vacation due to the (American) holiday.
Color certainly works well in the cases where that is available.
Otherwise, I prefer the above solution.
David
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-11-26 17:17 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-25 21:49 Extra pair of double quotes in "git commit" output? Nanako Shiraishi
2008-11-25 22:02 ` Junio C Hamano
2008-11-25 23:25 ` Jeff King
2008-11-26 0:06 ` Santi Béjar
2008-11-26 13:34 ` Jeff King
2008-11-26 15:07 ` Jakub Narebski
2008-11-26 17:15 ` David Brown
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 NNTP newsgroup(s).