@matheusbsbs / matheus-bagliano / commits / c5ee71fded
Fork 0

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: http://thread.gmane.org/gmane.comp.version-control.git/101687/focus=101735 Signed-off-by: Santi Béjar <santi@agolina.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Santi Béjar committed Jan 19, 2009 at 23:45 UTC c5ee71fdeda21aef8a65366a3f66aa7cbe58cba0
1 file changed +2 -2
builtin-commit.c
+2 -2
@@ -883,7 +883,7 @@ static void print_summary(const char *prefix, const unsigned char *sha1)
883 {
884 struct rev_info rev;
885 struct commit *commit;
886 - static const char *format = "format:%h: \"%s\"";
886 + static const char *format = "format:%h] %s";
887 unsigned char junk_sha1[20];
888 const char *head = resolve_ref("HEAD", junk_sha1, 0, NULL);
889
@@ -910,7 +910,7 @@ static void print_summary(const char *prefix, const unsigned char *sha1)
910 rev.diffopt.break_opt = 0;
911 diff_setup_done(&rev.diffopt);
912
913 - printf("[%s%s]: created ",
913 + printf("[%s%s ",
914 !prefixcmp(head, "refs/heads/") ?
915 head + 11 :
916 !strcmp(head, "HEAD") ?