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]

 



On Sat, Jun 10, 2017 at 02:14:01PM +0530, Kaartic Sivaraam wrote:

> > 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.

We could also add an option to "struct wt_status" to differentiate the
two cases.

I had forgotten completely that this would affect git-commit. And that
explains the "Initial commit" text in the first place. This output
originated as the git-commit template message, and only later was moved
into the git-status command. And in the context of making a commit,
saying "This is the initial commit" makes a lot of sense.

And it probably does mean we want separate messages for status and
commit. One is "if you were to make a commit, it would be the first".
The other is "you are making the first commit".

-Peff



[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]