Re: [RFC] Reverting individual files to HEAD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Matthieu Moy <Matthieu.Moy@xxxxxxx> writes:

> But since "git reset" already accepts partial resets in some
> circumstances, I think it makes sense to slightly extend it to allow
> partial reset in the case of "git reset --hard HEAD".

<commit>, not HEAD.  Anything else would be indeed introducing another
special case.

> At least, the error message should point to git-checkout. Something
> like this perhaps:

No, I don't think this is the right thing to do.

Extending git-reset to cover all of hard, soft and mixed also for
partial commits is, in my opinion, the right thing to do since it
_removes_ special cases in the view of the user.

That there is _another_ way to achieve a similar effect should not be
a deterrent to let git-reset do the _obvious_ thing for all partial
resets.

I don't agree with Junio's assessment that this invents an _arbitrary_
new way to do things.  It rather straightens out an irregularity in
git-reset that is currently there.

If you provide a patch that implements this for all partial resets
(and of course, for all <commit>s, not just HEAD) and adjusts the man
page (which should be possible mostly by _removing_ special cases),
then you have at least my vote for it.

-- 
David Kastrup

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux