From: Johannes Sixt <j.sixt@viscovery.net>
To: Jeff King <peff@peff.net>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [RFC PATCH] am: do not do any reset on --abort
Date: Mon, 25 May 2009 14:17:48 +0200 [thread overview]
Message-ID: <4A1A8C6C.5020009@viscovery.net> (raw)
In-Reply-To: <20090525120019.GA1740@coredump.intra.peff.net>
Jeff King schrieb:
> On Mon, May 25, 2009 at 01:49:18PM +0200, Johannes Schindelin wrote:
>
>>> We really have no idea what state the tree is in at this
>>> point, and whether the user might have done useful work on
>>> top of it. So let's err on the side of keeping the user's
>>> data intact.
>>>
>>> The downside is that if they do have cruft to get rid of, or
>>> want to pretend as if earlier parts of the series that were
>>> applied did not exist, they must manually "git reset --hard"
>>> now.
>> Hmm. I think I would revert that patch after merging git.git right away.
>
> You know, you can just say you don't like it. ;)
>
>> Can you at least check for a dirty tree and reset --hard if it is clean?
>
> No, that would defeat the purpose. The problem is that we have no idea
> what has happened since the initial "git am". The user may have made
> commits they want to keep, and we don't want to reset those away. They
> may even have pulled, which means ORIG_HEAD can no longer be trusted for
> a reset.
I wonder why we have this problem (and do something about it) with git-am,
but not with git-rebase. Is it perhaps that the usual case were people
were bitten by the old behavior is:
$ git am mbox
.... stops with conflicts
.... oops, wrong branch
$ git checkout other-branch
$ git am mbox
error: git am is already in progress
$ git am --abort
OUTCH! other-branch was reset!
rebase is not used in this manner, and even though it does reset --hard,
it doesn't hurt (that often).
-- Hannes
next prev parent reply other threads:[~2009-05-25 12:18 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-06 19:19 Bug: 'git am --abort' can silently reset the wrong branch Eduardo Habkost
2009-05-08 8:28 ` Jeff King
2009-05-08 8:37 ` Sverre Rabbelier
2009-05-08 9:01 ` Junio C Hamano
2009-05-08 9:12 ` Jeff King
2009-05-25 10:43 ` [RFC PATCH] am: do not do any reset on --abort Jeff King
2009-05-25 11:49 ` Johannes Schindelin
2009-05-25 12:00 ` Jeff King
2009-05-25 12:17 ` Johannes Sixt [this message]
2009-05-25 15:54 ` Avery Pennarun
2009-05-25 16:00 ` Jeff King
2009-05-25 16:02 ` Jeff King
2009-05-25 16:10 ` Avery Pennarun
2009-05-25 22:23 ` Junio C Hamano
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=4A1A8C6C.5020009@viscovery.net \
--to=j.sixt@viscovery.net \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.