git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Phillip Wood <phillip.wood@talktalk.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Git Mailing List <git@vger.kernel.org>,
	Phillip Wood <phillip.wood@dunelm.org.uk>
Subject: Re: [PATCH 6/6] cherry-pick/revert: reject --rerere-autoupdate when continuing
Date: Mon, 7 Aug 2017 11:17:04 +0100	[thread overview]
Message-ID: <bcaccf25-b033-259b-9ca7-b77a7240029b@talktalk.net> (raw)
In-Reply-To: <xmqqy3r0po0i.fsf@gitster.mtv.corp.google.com>

On 03/08/17 18:19, Junio C Hamano wrote:
> Phillip Wood <phillip.wood@talktalk.net> writes:
> 
>> On 02/08/17 23:29, Junio C Hamano wrote:
>> ...
>>> The
>>> latter makes it more in line with how "am -3" followed by "am --no-3
>>> --continue" behaves.
>>
>> I'm a bit confused about what am does when you pass extra options to
>> --continue. It looks like they do not persist if there's another
>> conflict and may only apply to the first patch that is applied when
>> resuming - I'd need to spend more time looking at the code or run a test
>> to be sure.
> 
> I think you got what "am" wants to do.  
> 
> The idea is that the user would say she does not trust the three-way
> fallback when she starts to apply many patches in an mbox, i.e.
> 
>    $ git am mbox
> 
> Upon seeing a message that does not apply, she would examine the
> patch that caused _this_ stoppage, and then decide that it is safe
> to apply _this_ patch (but not necessarily later ones) with
> three-way fallback and move on:
> 
>     $ git am -3 --continue
> 
> I have not thought too deeply if the parallel applies to
> multi-commit pick, though.  
> 
> "am" (rather, its underlying machinery "apply") is designed to be
> all-or-none, so a failed --no-3way application would leave the index
> and the working tree intact.  "-3 --continue" can retry the failed
> step, with "--3way" processing turned on for only one message, from
> that state.
> 
> But a multi-commit cherry-pick/revert would stop _after_ it munges
> the conflicted paths in the index into an unmerged state and writes
> the conflicted state into the working tree files.  For "--continue
> --rerere-autoupdate" to work more like "am --continue -3", it would
> have to learn to reset to the state before the failed cherry-pick
> first, before re-attempting the failed cherry-pick with the auto
> update enabled only for the single commit and keep going.  So it may
> not as trivial as "am --continue", even though it sounds doable.
> 
Thanks for explaining that, as you say having cherry-pick take
'--rerere-autoupadate' with '--continue' sounds more complicated than
the am case. Also I'm not sure it would be as helpful to toggle
'--rerere-autoupdate' with cherry-pick as it is to toggle '--3way' with
am as it's not that hard for the user to stage the merged files
themselves. If you're happy with the way it is currently implemented I'm
not inclined to change it.

Thanks

Phillip

      reply	other threads:[~2017-08-07 10:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-02 10:44 [PATCH 0/6] am/cherry-pick/rebase/revert --rerere-autoupdate fixes Phillip Wood
2017-08-02 10:44 ` [PATCH 1/6] am: remember --rerere-autoupdate setting Phillip Wood
2017-08-02 10:44 ` [PATCH 2/6] rebase: honor --rerere-autoupdate Phillip Wood
2017-08-02 10:44 ` [PATCH 3/6] rebase -i: " Phillip Wood
2017-08-02 10:44 ` [PATCH 4/6] t3504: use test_commit Phillip Wood
2017-08-02 10:44 ` [PATCH 5/6] cherry-pick/revert: remember --rerere-autoupdate Phillip Wood
2017-08-02 10:44 ` [PATCH 6/6] cherry-pick/revert: reject --rerere-autoupdate when continuing Phillip Wood
2017-08-02 21:57   ` Junio C Hamano
2017-08-02 22:29     ` Junio C Hamano
2017-08-03 10:15       ` Phillip Wood
2017-08-03 17:19         ` Junio C Hamano
2017-08-07 10:17           ` Phillip Wood [this message]

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bcaccf25-b033-259b-9ca7-b77a7240029b@talktalk.net \
    --to=phillip.wood@talktalk.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=phillip.wood@dunelm.org.uk \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).