Thread (5 messages) flat view 5 messages, 4 authors, 2017-06-10

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

From: Kaartic Sivaraam <hidden>
Date: 2017-06-10 08:45:03

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 [off-list ref]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help