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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Kaartic Sivaraam" <kaarticsivaraam91196@xxxxxxxxx>
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

To me this sounds perfectly natural. It is the current status. The line will be ignored by the commit message anyway unless the user edits the start of the line.

At most it is a feeling that maybe we should provide an imperative statement, but even then, it's still stating the obvious (which is normally a bad thing). If the user is adding a .gitignore file then the commit message should say so, etc. Maybe the "Initial commit" is meant to be the default (by convention) separator, or its just a convention we've become used to.

#
# 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 <kaarticsivaraam91196@xxxxxxxxx>

--
Philip



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux