Re: [PATCH v3 3/4] reset: add option "--merge-safe" to "git reset"
- From
Johannes Sixt <j.sixt@viscovery.net>
- Date
- Sep 17, 2009, 07:24 UTC
- Message-ID
- <4AB1E41F.6050304@viscovery.net>
- In-Reply-To
- <7vr5u6jbgk.fsf@alter.siamese.dyndns.org>
Junio C Hamano schrieb:
Show 5 quoted lines
> Johannes Sixt <j.sixt@viscovery.net> writes: >> Junio C Hamano schrieb: >> (2) The intended use-case of --merge-safe is to point the branch head to a >> different commit, but to carry the changes that currently are in the index >> and wd over to the new commit, similar to checkout --merge.
This is actually an operation that I need quite often, but I can do it only by way of git stash.
Clarification: I did not say that I actually meant to carry *only* the index and wd changes to the new commit. That is, the operation I have in mind can roughly be done in terms of
$ git stash $ git reset --hard $target $ git stash pop
> I have _no_ idea what the intended use-case of --merge-safe is, and that > was why I asked Christian for clarification in the previous round. The > answer was still not clear enough so I pointed out --merge-safe could be > still doing a wrong thing even in _his_ use-case.
Reading Christian in 200909170554.49416.chriscool@tuxfamily.org, I think this *is* his use-case? Christian?
-- Hannes