From: Ariel <asgit@dsgml.com>
To: Duy Nguyen <pclouds@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: git add -p with new file
Date: Fri, 9 Dec 2016 13:26:58 -0500 (EST) [thread overview]
Message-ID: <alpine.DEB.2.11.1612091322290.13185@cherryberry.dsgml.com> (raw)
In-Reply-To: <CACsJy8A_YMyEUgX--1tEfJC4aaYfDbFFL8WEs6CHp4a4=mHRjw@mail.gmail.com>
On Wed, 7 Dec 2016, Duy Nguyen wrote:
> On Wed, Dec 7, 2016 at 8:18 AM, Ariel <asgit@dsgml.com> wrote:
>> If you do git add -p new_file it says:
>> No changes.
>> Which is a rather confusing message. I would expect it to show me the
>> content of the file in patch form, in the normal way that -p works, let me
>> edit it, etc.
> We could improve it a bit, suggesting the user to do git add -N. But
> is there a point of using -p on a new file?
I got into the habit of always using -p as a way of checking my diffs
before committing, so I ran it out of habit on a new file as well and got
that confusing message.
It's even worse if you run it on multiple files, some changed, some added
- the added ones are ignored completely, without any message at all.
> It will be one big chunk, you can't split anything.
That's fine, that's what I would expect.
> Perhaps maybe you want to use 'e' to edit what's added?
I might, but mainly it would show me what it was adding.
-Ariel
next prev parent reply other threads:[~2016-12-09 18:27 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-07 1:18 git add -p with new file Ariel
2016-12-07 9:22 ` Duy Nguyen
2016-12-09 18:26 ` Ariel [this message]
2016-12-12 20:24 ` Stephan Beyer
2016-12-09 14:11 ` Jeff King
2016-12-09 18:43 ` Ariel
2016-12-10 8:55 ` Jeff King
2016-12-10 22:04 ` Junio C Hamano
2016-12-11 13:00 ` Jeff King
2016-12-12 20:31 ` Stephan Beyer
2016-12-13 17:33 ` Jeff King
2016-12-13 18:48 ` Junio C Hamano
2016-12-13 18:56 ` Jeff King
2016-12-13 19:12 ` Junio C Hamano
2016-12-13 19:21 ` git add -p with unmerged files (was: git add -p with new file) Stephan Beyer
2016-12-13 19:49 ` Jeff King
2016-12-13 19:59 ` git add -p with unmerged files Junio C Hamano
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=alpine.DEB.2.11.1612091322290.13185@cherryberry.dsgml.com \
--to=asgit@dsgml.com \
--cc=git@vger.kernel.org \
--cc=pclouds@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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