Subject: Re: [PATCH] wt-status.c: Modified status message shown for a parent-less branch

From: Kaartic Sivaraam <[email-masked]>
Date: Sat, 10 Jun 2017 14:14:01 +0530

On Sat, 2017-06-10 at 11:23 +0900, Junio C Hamano wrote:
> $ git shortlog -20 --no-merges
> 
> may help learning the preferred style of writing the title.  We do
> not say "[I] did this".  Instead we phrase things in imperative
> mood, giving an order to the codebase to "become like so".  E.g.
This style is a little new to me thus my commit message turned out to
be a repercussion of my own style (which, I guess, targets other
developers who read the log). Will be careful the next time :). Made
the requested changes except for a few doubts they raised (see comments
below).

> And it wasn't just "a little" confusing.
> 
> 	"git status" indicated "Initial commit" when HEAD points at
> 	an unborn branch.  This message is shared with the commit
> 	log template "git commit" prepares for the user when
> 	creating a commit (i.e. "You are about to create the initial
> 	commit"),
I didn't get that, where should I be seeing the line, "You are about to
create the initial commit" in the commit template ? I just saw "Initial
commit" in it.

> Does this break "git commit", or is the update limited to "git
> status"?
This does seem to be breaking 'git commit' as it seems to be using the
output of 'git status'. This change results in the following commit
template for the initial commit,

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# On branch master
#
# Waiting for initial commit
#
# Changes to be committed:
#       new file:   test-file
#

Looks odd. Not sure how to fix this. Maybe on of the alternatives have
to be considered. "Your current branch does not have any commits" seems
a good one.

-- 
Regards,
Kaartic Sivaraam <[email-masked]>