From: Junio C Hamano <hidden> Date: 2017-06-06 01:52:56
Samuel Lijin [off-list ref] writes:
For what it's worth, I've never quite understood the "Initial commit"
message, because the repository is in a state where there are no
commits yet, not when HEAD is pointing to a root commit.
Ah, that is true. The message in the "status" output attempts to
tell you that you are about to make the "initial commit", because
"status" was not originally a thing (it was just the message when
"git commit" gives you while you compose the commit log message).
In the context of "status", it probably is more logically correct if
it said "No commit yet" or something. This is no longer "is initial
harder than root?" ;-)
On 6 June 2017 at 11:52, Junio C Hamano [off-list ref] wrote:
Samuel Lijin [off-list ref] writes:
quoted
For what it's worth, I've never quite understood the "Initial commit"
message, because the repository is in a state where there are no
commits yet, not when HEAD is pointing to a root commit.
In the context of "status", it probably is more logically correct if
it said "No commit yet" or something. This is no longer "is initial
harder than root?" ;-)
Exactly. I agree with OP, in the context of running 'git status', I find
the string "Initial commit" confusing in the example below, because
at that time no commits exist. This creates confusion what git is
talking about. The 'git log' message is not very friendly either.
Perhaps say something like "Repository is empty." there.
$ mkdir test
$ cd test
$ git init
Initialized empty Git repository in /mnt/hart/home/david_d08/junk/test/.git/
$ git log
fatal: bad default revision 'HEAD'
$ git status
On branch master
Initial commit
nothing to commit (create/copy files and use "git add" to track)
From: Philip Oakley <hidden> Date: 2017-06-06 11:06:21
From: "David" <redacted>
On 6 June 2017 at 11:52, Junio C Hamano [off-list ref] wrote:
quoted
Samuel Lijin [off-list ref] writes:
quoted
For what it's worth, I've never quite understood the "Initial commit"
message, because the repository is in a state where there are no
commits yet, not when HEAD is pointing to a root commit.
In the context of "status", it probably is more logically correct if
it said "No commit yet" or something. This is no longer "is initial
harder than root?" ;-)
Exactly. I agree with OP, in the context of running 'git status', I find
the string "Initial commit" confusing in the example below, because
at that time no commits exist. This creates confusion what git is
talking about. The 'git log' message is not very friendly either.
Perhaps say something like "Repository is empty." there.
<bikeshed>
I like that. I think that is a very appropriately descriptive statement.
An alternative ,with slightly less textual change, could be "Waiting for
initial commit"
</bikeshed>
$ mkdir test
$ cd test
$ git init
Initialized empty Git repository in
/mnt/hart/home/david_d08/junk/test/.git/
$ git log
fatal: bad default revision 'HEAD'
$ git status
On branch master
Initial commit
nothing to commit (create/copy files and use "git add" to track)
From: SZEDER Gábor <hidden> Date: 2017-06-06 11:45:12
quoted
quoted
In the context of "status", it probably is more logically correct if
it said "No commit yet" or something. This is no longer "is initial
harder than root?" ;-)
Exactly. I agree with OP, in the context of running 'git status', I find
the string "Initial commit" confusing in the example below, because
at that time no commits exist. This creates confusion what git is
talking about. The 'git log' message is not very friendly either.
Perhaps say something like "Repository is empty." there.
<bikeshed>
I like that. I think that is a very appropriately descriptive statement.
An alternative ,with slightly less textual change, could be "Waiting for
initial commit"
</bikeshed>
We should consider orphan/unborn branches, too:
git (master)$ git checkout --orphan newroot
Switched to a new branch 'newroot'
git (newroot +)$ git reset --hard
git (newroot #)$ git status
On branch newroot
Initial commit
nothing to commit (create/copy files and use "git add" to track)
A purely textual change will not be sufficient, I'm afraid. Saying
"Repository is empty" right after 'git init' is fine, I like it.
However, on an unborn branch with empty index it would be just wrong.
"Waiting for initial commit" is much better even in this case, but I
still don't like that "initial", though I can't say why, and don't
have any better suggestion either. Though users experienced enough to
create an empty unborn branch would probably not be confused by that.
From: Jeff King <hidden> Date: 2017-06-06 18:45:21
On Tue, Jun 06, 2017 at 01:43:55PM +0200, SZEDER Gábor wrote:
quoted
An alternative ,with slightly less textual change, could be "Waiting for
initial commit"
</bikeshed>
We should consider orphan/unborn branches, too:
git (master)$ git checkout --orphan newroot
Switched to a new branch 'newroot'
git (newroot +)$ git reset --hard
git (newroot #)$ git status
On branch newroot
Initial commit
nothing to commit (create/copy files and use "git add" to track)
A purely textual change will not be sufficient, I'm afraid. Saying
"Repository is empty" right after 'git init' is fine, I like it.
However, on an unborn branch with empty index it would be just wrong.
"Waiting for initial commit" is much better even in this case, but I
still don't like that "initial", though I can't say why, and don't
have any better suggestion either. Though users experienced enough to
create an empty unborn branch would probably not be confused by that.
I agree. If the state we are describing is limited to the current
branch, how about saying so? Like "Your current branch has no commits".
-Peff
From: Jeff King <hidden> Date: 2017-06-06 18:53:30
On Tue, Jun 06, 2017 at 02:42:01PM -0400, Jeff King wrote:
quoted
"Waiting for initial commit" is much better even in this case, but I
still don't like that "initial", though I can't say why, and don't
have any better suggestion either. Though users experienced enough to
create an empty unborn branch would probably not be confused by that.
I agree. If the state we are describing is limited to the current
branch, how about saying so? Like "Your current branch has no commits".
Actually, something like "does not yet have any commits" might be
better.
There is a slight complication, though. There's similar text in "git
status -sb", which shows:
## Initial commit on master
Should that also change to use consistent terminology? If so, we need a
phrasing short phrasing that matches (and the --porcelain and
--porcelain=v2 formats of course would need to remain the same).
-Peff