Re: [PATCH,RFC] Implement 'git rm --if-missing'

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Petr Baudis <pasky@...>
Cc: Ciaran McCreesh <ciaran.mccreesh@...>, <git@...>
Date: Wednesday, July 16, 2008 - 2:17 pm

On 7/16/08, Petr Baudis <pasky@suse.cz> wrote:

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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH,RFC] Implement 'git rm --if-missing', Ciaran McCreesh, (Wed Jul 16, 2:00 pm)
Re: [PATCH,RFC] Implement 'git rm --if-missing', Junio C Hamano, (Wed Jul 16, 2:48 pm)
Re: [PATCH,RFC] Implement 'git rm --if-missing', Peter Baumann, (Wed Jul 16, 2:58 pm)
Re: [PATCH,RFC] Implement 'git rm --if-missing', David Christensen, (Wed Jul 16, 3:43 pm)
Re: [PATCH,RFC] Implement 'git rm --if-missing', Petr Baudis, (Wed Jul 16, 2:06 pm)
Re: [PATCH,RFC] Implement 'git rm --if-missing', Avery Pennarun, (Wed Jul 16, 2:17 pm)