From: "Avery Pennarun" <apenwarr@gmail.com>
To: "Petr Baudis" <pasky@suse.cz>
Cc: "Ciaran McCreesh" <ciaran.mccreesh@googlemail.com>, git@vger.kernel.org
Subject: Re: [PATCH,RFC] Implement 'git rm --if-missing'
Date: Wed, 16 Jul 2008 14:17:33 -0400 [thread overview]
Message-ID: <32541b130807161117h54e97825o9119655f73138341@mail.gmail.com> (raw)
In-Reply-To: <20080716180617.GO32184@machine.or.cz>
On 7/16/08, Petr Baudis <pasky@suse.cz> wrote:
> On Wed, Jul 16, 2008 at 07:00:50PM +0100, Ciaran McCreesh wrote:
> > git rm --if-missing will only remove files if they've already been removed from
> > disk.
> >
> > Signed-off-by: Ciaran McCreesh <ciaran.mccreesh@googlemail.com>
>
> what is the usage scenario? The porcelain options space is a precious
> resource, so please explain why do you need this and who is going to use
> it (especially with such a long name).
I see the idea here: right now you can do:
touch a b c
git add .
And have it auto-add all the new files, so "git commit" will work.
But there is no equivalent for rm, because for obvious reasons,
rm b c
git rm .
Doesn't do the same thing. And "git add ." doesn't auto-recognize
deletions, which probably also makes sense.
"git commit -a", on the other hand, will automatically commit all
deletions for you. But you don't always want to commit *all* your
changes just because you want to commit all your deletions.
That said, --if-missing is a bit unwieldy. I don't have a better
suggestion though.
Have fun,
Avery
next prev parent reply other threads:[~2008-07-16 18:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-16 18:00 [PATCH,RFC] Implement 'git rm --if-missing' Ciaran McCreesh
2008-07-16 18:06 ` Petr Baudis
2008-07-16 18:17 ` Avery Pennarun [this message]
2008-07-16 18:48 ` Junio C Hamano
2008-07-16 18:58 ` Peter Baumann
2008-07-16 19:43 ` David Christensen
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=32541b130807161117h54e97825o9119655f73138341@mail.gmail.com \
--to=apenwarr@gmail.com \
--cc=ciaran.mccreesh@googlemail.com \
--cc=git@vger.kernel.org \
--cc=pasky@suse.cz \
/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;
as well as URLs for NNTP newsgroup(s).