Thread (50 messages) flat view 50 messages, 13 authors, 2016-06-15

Re: [PATCH] Builtin-commit: show on which branch a commit was added

From: Shawn O. Pearce <hidden>
Date: 2016-06-15 22:45:25

Possibly related (same subject, not in this thread)

Jeff King [off-list ref] wrote:
On Wed, Oct 01, 2008 at 08:10:11AM -0700, Shawn O. Pearce wrote:
quoted
Actually I rather like the patch you submitted yesterday:

        normal case
        Created abc9056 (i386: Snib the sprock) on i386

        detached head
        Created DETACHED commit abc9056 (i386: Snib the sprock)

        initial commit
        Created root-commit abc9056 (i386: Snib the sprock) on i386

The detached HEAD and root-commit cases are clearly denoted at the
very start of the line, where your eyes are likely to start scanning
I agree with your assumption that people scan the line from left to
right, and that the most important stuff should come first. So that
format covers _those_ cases, but not the case of "oops, I committed on
a different branch than I intended." So I think it really makes sense
to keep the branch name on the left side, and the commit subject last.
I briefly considered a format like this while replying above, but
at prior day-job I used rather long branch names (sometimes with
common prefixes) so it would truncate alot:

  normal case
  On i386           abc9056 (i386: Snib the sprock)

  detached head
  On DETACHED HEAD  abc9056 (i386: Snib the sprock)

  initial commit
  On i386
  Root commit       abc9056 (i386: Snib the sprock)

With the branch name field set at about 15 characters and truncated.
The initial commit case is very infrequent so burning two lines
for it to help make it stand out *and* make the branch name clear
isn't really a problem.
 
quoted
Right now I'm happy with your patch in next.  I don't like taking
the paint brush away from folks, but I also don't want to be applying
a ton of commit message reformatting patches over the next week.  ;-)
Welcome to maintainership. ;P
*sigh*  And I just took up the #@*#@!&!*!@ paintbrush myself.
Dammit.  I'm putting it down now.  Really.  :-)

-- 
Shawn.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help