From: Elijah Newren <newren@gmail.com>
To: Theodore Tso <tytso@mit.edu>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Scott Chacon <schacon@gmail.com>, git list <git@vger.kernel.org>
Subject: Re: EasyGit Integration
Date: Tue, 9 Jun 2009 22:20:45 -0600 [thread overview]
Message-ID: <51419b2c0906092120o56db640cg2fcf77c11e7b7f42@mail.gmail.com> (raw)
In-Reply-To: <20090610033211.GA7411@mit.edu>
On Tue, Jun 9, 2009 at 9:32 PM, Theodore Tso<tytso@mit.edu> wrote:
> My personal opinion is this kind of overloading is actually more
> confusing than simply adding a new name, such as "git revert-file".
> Of course, you can do that already using a git alias.... So IMHO the
> best way of handling this issue is to have git tutorials use this as a
> teachable moment, so people can create their own git alias for "git
> checkout HEAD --".
So I have a few problems with such an alias:
* It fails to work during an initial commit ("git revert-files
new-file" -> "fatal: invalid reference: HEAD")
* When not working on the initial commit, it will silently do nothing
when given a newly added file rather than undoing the add
* As a side effect of the above, trying to undo all changes via "git
revert-files ." does not actually work; any newly added files will
still remain staged.
* It makes no sense during an incomplete merge (why is HEAD more
special than other refs in $git_dir/MERGE_HEAD? Shouldn't the user
need to specify which ref to revert relative to in such a case?)
* It can't be used to revert a file back to a revision prior to HEAD
(and 'git checkout OLDER_COMMIT -- FILE' in such a case isn't always
the right match either as it can leave the file in the working copy
when it should be removed).
* It provides no option to make the changes to just the index or just
the working copy; it always affects both (which is the right default,
but sometimes I like making changes to just one of those two places).
"git checkout <commit> -- <paths>..." really is a different command
than the "revert" of svn, bzr, darcs, or mercurial. There's clearly a
lot of overlap, but they're not the same. I fear that claiming they
are equivalent will at some point just cause extra confusion for new
git users.
Elijah
next prev parent reply other threads:[~2009-06-10 4:20 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-09 18:59 EasyGit Integration Scott Chacon
2009-06-09 19:43 ` Nicolas Pitre
2009-06-09 19:52 ` Avery Pennarun
2009-06-09 20:37 ` Björn Steinbrink
2009-06-09 20:42 ` Avery Pennarun
2009-06-10 12:13 ` Björn Steinbrink
2009-06-09 20:49 ` Elijah Newren
2009-06-10 1:09 ` Miles Bader
2009-06-09 20:12 ` Björn Steinbrink
2009-06-09 20:40 ` Elijah Newren
2009-06-09 21:18 ` Björn Steinbrink
2009-06-09 21:27 ` Björn Steinbrink
2009-06-09 21:36 ` Junio C Hamano
2009-06-09 21:48 ` Elijah Newren
2009-06-09 22:00 ` Elijah Newren
2009-06-10 12:52 ` Matthieu Moy
2009-06-09 22:14 ` Linus Torvalds
2009-06-09 22:30 ` Elijah Newren
2009-06-09 22:40 ` Linus Torvalds
2009-06-10 0:40 ` Mark Lodato
2009-06-10 3:11 ` Miles Bader
2009-06-10 3:32 ` Theodore Tso
2009-06-10 4:03 ` Linus Torvalds
2009-06-10 22:31 ` Felipe Contreras
2009-06-10 23:04 ` Linus Torvalds
2009-06-10 23:57 ` Scott Chacon
2009-06-11 0:15 ` Jakub Narebski
2009-06-11 0:30 ` Felipe Contreras
2009-06-11 0:42 ` Jakub Narebski
2009-06-12 20:57 ` Felipe Contreras
2009-06-12 21:21 ` Jakub Narebski
2009-06-12 21:48 ` Felipe Contreras
2009-06-12 22:05 ` Jakub Narebski
2009-06-12 22:30 ` Felipe Contreras
2009-06-13 1:24 ` Björn Steinbrink
2009-06-11 0:18 ` Felipe Contreras
2009-06-10 4:20 ` Elijah Newren [this message]
2009-06-10 14:40 ` Matthieu Moy
2009-06-10 1:25 ` Sam Vilain
2009-06-10 1:59 ` Linus Torvalds
2009-06-10 2:18 ` Junio C Hamano
2009-06-10 2:52 ` Sam Vilain
2009-06-10 6:43 ` Jakub Narebski
2009-06-10 3:27 ` Nicolas Pitre
2009-06-10 20:47 ` Junio C Hamano
2009-06-10 22:28 ` Elijah Newren
2009-06-10 16:48 ` Scott Chacon
2009-06-10 22:15 ` Felipe Contreras
2009-06-10 22:04 ` Felipe Contreras
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=51419b2c0906092120o56db640cg2fcf77c11e7b7f42@mail.gmail.com \
--to=newren@gmail.com \
--cc=git@vger.kernel.org \
--cc=schacon@gmail.com \
--cc=torvalds@linux-foundation.org \
--cc=tytso@mit.edu \
/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).