Code

reformat informational commit message
authorJeff King <peff@peff.net>
Wed, 1 Oct 2008 22:31:25 +0000 (18:31 -0400)
committerShawn O. Pearce <spearce@spearce.org>
Fri, 3 Oct 2008 00:08:16 +0000 (17:08 -0700)
commitc85db254d9d3309bb330444385dbb3b7be5100d3
tree73689016d0e5d1f478843e05b21d09bb6d1546b5
parent72c69ebc035efe08aef03866184aa9b344814d93
reformat informational commit message

When committing, we print a message like:

  Created [DETACHED commit] <hash> (<subject>) on <branch>

The most useful bit of information there (besides the
detached status, if it is present) is which branch you made
the commit on. However,  it is sometimes hard to see because
the subject dominates the line.

Instead, let's put the most useful information (detached
status and commit branch) on the far left, with the subject
(which is least likely to be interesting) on the far right.

We'll use brackets to offset the branch name so the line is
not mistaken for an error line of the form "program: some
sort of error". E.g.,:

  [jk/bikeshed] created bd8098f: "reformat informational commit message"

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
builtin-commit.c