Re: [RFC] git rm -u
- From
Antoine Pelisse <apelisse@gmail.com>
- Date
- Feb 25, 2013, 18:54 UTC
- Message-ID
- <CALWbr2x9=+PEaGTpGWoqGiiupGsPhLoPcGknPb1WtSgxdpBkdQ@mail.gmail.com>
- In-Reply-To
- <7vzjys28a0.fsf@alter.siamese.dyndns.org>
I must say that I'm not very interested in the feature. In my opinion, there are already many different ways to stage changes. Assuming that the feature would be needed, I would keep it under the scope of git-add, as it's the reference for staging. I would suggest something like:
git add -r "Stage removal of deleted files."
On Mon, Feb 25, 2013 at 7:54 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 27 quoted lines
> Eric James Michael Ritz <lobbyjones@gmail.com> writes: > >> On 01/19/2013 04:49 PM, Antoine Pelisse wrote: >>> I think `git add -u` would be closer. It would stage removal of >>> files, but would not stage untracked files. It would stage other >>> type of changes though. >> >> On Sat, Jan 19, 2013 at 10:47 PM, Tomas Carnecky >>> Does `git add -A` do what you want? >> >> Thank you Tomas and Antoine. Both of these commands do what I want: >> stage deleted files on the index. But does the idea of a `git rm -u` >> still sound useful since these commands also stage changes besides >> deleted files? > > Even though I am not sure how often I would use it myself, "reflect > only the removals in the working tree to the index, but exclude any > other kind of changes" might turn out to be a useful addition to the > toolchest in certain cases. > > I however am not yet convinced that "git rm -u" is a good way to > express the feature at the UI. "git add -u" is "update the index > with modification and removal but ignore new files because we won't > know if they are garbage or assets". What the same "-u" option > means in the context of "git rm" is not very clear, at least to me. > >