From: Sam Vilain <sam@vilain.net>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Carl Worth <cworth@cworth.org>, git@vger.kernel.org
Subject: Re: On removing files and "git-rm is pointless"
Date: Sun, 03 Dec 2006 09:00:00 +1300 [thread overview]
Message-ID: <4571DB40.6020800@vilain.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0612020919400.3476@woody.osdl.org>
Linus Torvalds wrote:
> I'd like it more if it defaulted to actually removing the file, preferably
> refusing to with an error message if the file didn't match the index.
index, or HEAD version? Otherwise you can "update-index"; "rm" without
seeing something wrong is happening.
> Final note: arguably, the current "git rm" is a better mirror image of
> "git add" than what I suggest above. "git add" doesn't actually create the
> working file (you had to do that yourself), so you _could_ argue that "git
> rm" as it stands now is closer to the "reverse" of git add. The same is
> true of the recursive behaviour.
For this reason I think that the current behaviour is not so broken.
Everywhere else, it is up to the user to make the changes to the working
copy that they want to commit. I like git-rm because I can go:
rm -rf whatever
git-rm whatever
I can see why you'd want
git-rm -u whatever
or
rm -rf whatever
git-commit -a
An extra flag to actually unlink the files is less likely to cause bugs
with porcelain expecting git-rm to behave as it does currently. If it
is to be changed in backwards incompatible ways, there should probably
be a deprecation time.
"rm -u" could alter the default semantics, ie, require the extra -r
option to recurse and require -f unless things are safe.
next prev parent reply other threads:[~2006-12-02 20:00 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-02 17:05 On removing files and "git-rm is pointless" Carl Worth
2006-12-02 17:37 ` Linus Torvalds
2006-12-02 20:00 ` Sam Vilain [this message]
2006-12-03 3:50 ` Nicolas Pitre
2006-12-04 10:13 ` Junio C Hamano
2006-12-04 10:48 ` Jakub Narebski
2006-12-04 15:42 ` Linus Torvalds
2006-12-04 16:03 ` Jakub Narebski
2006-12-04 16:04 ` Olivier Galibert
2006-12-05 1:08 ` Junio C Hamano
2006-12-05 3:29 ` Nicolas Pitre
2006-12-05 3:44 ` Carl Worth
2006-12-05 5:43 ` Junio C Hamano
2006-12-02 20:59 ` Horst H. von Brand
2006-12-02 21:10 ` Sam Vilain
2006-12-02 21:33 ` Linus Torvalds
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=4571DB40.6020800@vilain.net \
--to=sam@vilain.net \
--cc=cworth@cworth.org \
--cc=git@vger.kernel.org \
--cc=torvalds@osdl.org \
/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).