From: Junio C Hamano <gitster@pobox•com>
To: Duy Nguyen <pclouds@gmail•com>
Cc: Jonathan Nieder <jrnieder@gmail•com>,
757297@bugs•debian.org, Git Mailing List <git@vger•kernel.org>,
submit@bugs•debian.org
Subject: Re: Bug#757297: 'git status' output is confusing after 'git add -N'
Date: Thu, 07 Aug 2014 09:31:41 -0700 [thread overview]
Message-ID: <xmqqmwbgl0r6.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <CACsJy8DnWZfKqwjOjjU17YtN1Zqk0vy5nyfOBLjn-RiJkKCo6Q@mail.gmail.com> (Duy Nguyen's message of "Thu, 7 Aug 2014 08:51:14 +0700")
Duy Nguyen <pclouds@gmail•com> writes:
> On Thu, Aug 7, 2014 at 7:34 AM, Jonathan Nieder <jrnieder@gmail•com> wrote:
>> Package: git
>> Version: 1:2.0.0-1
>> Tags: upstream
>>
>> $ git init foo
>> Initialized empty Git repository in /tmp/t/foo/.git/
>> $ cd foo
>> $ echo hi >README
>> $ git add -N README
>> $ git status
>> On branch master
>>
>> Initial commit
>>
>> Changes to be committed:
>> (use "git rm --cached <file>..." to unstage)
>>
>> new file: README
>>
>> Changes not staged for commit:
>> (use "git add <file>..." to update what will be committed)
>> (use "git checkout -- <file>..." to discard changes in working directory)
>>
>> modified: README
>>
>> If I then run "git commit", it does not actually commit the addition
>> of the README file.
>
> We used to reject such a commit operation before 3f6d56d (commit:
> ignore intent-to-add entries instead of refusing - 2012-02-07) so it
> was harder to misunderstand this case.
>
>> It would be clearer to have a separate section,like so:
>>
>> Tracked files not to be committed:
>> (use "git rm --cached <file>..." to stop tracking)
>>
>> new file: README
>>
>
> Or make the "Changes not staged for commit" part say "new file:
> README" ("modified" is implied)
Yeah, after reading the justification in the quoted commit, I agree
that it is status that is at fault in the above; "new file: README"
is part of "Changes not staged for commit" in this case (it is told
to the index, but the user never said it is "for commit" yet, which
is the whole point of "-N"), so instead of adding a new section, I
agree that it should be classified as "new file" not "modified"
there.
prev parent reply other threads:[~2014-08-07 16:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20140807003449.GC12427@google.com>
2014-08-07 1:51 ` Bug#757297: 'git status' output is confusing after 'git add -N' Duy Nguyen
2014-08-07 16:31 ` Junio C Hamano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqmwbgl0r6.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=757297@bugs$(echo .)debian.org \
--cc=git@vger$(echo .)kernel.org \
--cc=jrnieder@gmail$(echo .)com \
--cc=pclouds@gmail$(echo .)com \
--cc=submit@bugs$(echo .)debian.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox