diff options
author | Santi Béjar <santi@agolina.net> | 2009-01-19 23:45:16 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-01-19 22:38:06 -0800 |
commit | c5ee71fdeda21aef8a65366a3f66aa7cbe58cba0 (patch) | |
tree | 85ce390996f8997da3adf1ee4609ab66ff8a5680 | |
parent | b6bc8c2309d7667ba5a43cb6417b5b60a358754d (diff) | |
download | git-c5ee71fdeda21aef8a65366a3f66aa7cbe58cba0.tar.gz git-c5ee71fdeda21aef8a65366a3f66aa7cbe58cba0.tar.xz |
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>
-rw-r--r-- | builtin-commit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin-commit.c b/builtin-commit.c index 2f0b00a17..b159af2e5 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") ? |