On Wed, Oct 01, 2008 at 08:10:11AM -0700, Shawn O. Pearce wrote:
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
from first before you say "Doh, its just line noise because Git wants
a pat on the back for doing what I asked". Thus you are likely
to notice something out of the ordinary (commit on detached HEAD)
pretty quick.
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.
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
-Peff