Re: [PATCH] git-revert is one of the most misunderstood command in git, help users out.
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Nov 6, 2007, 12:32 UTC
- Message-ID
- <Pine.LNX.4.64.0711061230540.4362@racer.site>
- In-Reply-To
- <7vode8j7o5.fsf@gitster.siamese.dyndns.org>
Hi,
On Mon, 5 Nov 2007, Junio C Hamano wrote:
Show 16 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes: > > > On Mon, 5 Nov 2007, Junio C Hamano wrote: > > > >> Allowing people to revert or cherry pick partially by using paths > >> limiter is a very good idea; the whole "it comes from a commit so we > >> also commit" feels an utter nonsense, though. > > > > No. > > > > When "git revert <commit>" commits the result, "git revert <commit> -- > > <file>" should, too. > > I was not questioning about that part. "If 'git revert <some > other form> foo' does not talk about commit, it should not > commit" was what I was referring to.
Well, I think that _if_ we allow "git revert <path>" to mean "revert the changes to <path>, relative to the index" (which would be the same as "git checkout <path>"), then committing that change just does not make sense.
And it is this behaviour that people are seeking, not "git revert <commit> <path>".
Ciao, Dscho