Commit c5ee71fd authored by Santi Béjar's avatar Santi Béjar Committed by Junio C Hamano

commit: more compact summary and without extra quotes

Update the report format again to save the screen real estates, while
avoiding from enclosing the one-line summary of the commit log inside
double quotes pair, which looks awkward when the message begins or ends
with a double quote.  The old format looked like this:

    [master]: created d9a5491: "foo:bar"

Simply removing the double quotes were found to be confusing as a message
often begins with a short-word (area of the system) and a colon.

The new format looks like this:

    [master d9a5491] foo:bar

As discussed in the git mailing list: default avatarSanti Béjar <[email protected]>
Signed-off-by: default avatarJunio C Hamano <[email protected]>
parent b6bc8c23
......@@ -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;
printf("[%s%s]: created ",
printf("[%s%s ",
!prefixcmp(head, "refs/heads/") ?
head + 11 :
!strcmp(head, "HEAD") ?
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment