From: Junio C Hamano <gitster@pobox.com>
To: Elijah Newren <newren@gmail.com>
Cc: ZheNing Hu <adlternative@gmail.com>,
Christian Couder <christian.couder@gmail.com>,
Git List <git@vger.kernel.org>,
vascomalmeida@sapo.pt
Subject: Re: Question about pre-merge and git merge octopus strategy
Date: Fri, 13 May 2022 05:56:58 -0700 [thread overview]
Message-ID: <xmqq35hdd205.fsf@gitster.g> (raw)
In-Reply-To: CABPp-BGOGLUPOn20yWzCrBYCykiet0=5UfbkuGC78f-QoWVvYg@mail.gmail.com
Elijah Newren <newren@gmail.com> writes:
>> If merge-recursive or merge-resolve is asked to merge a single
>> commit to the current branch without any other strategies to use as
>> a fallback, they leave the working tree and index into a state where
>> the end-user can conclude the conflict resolution and commit the
>> result. In spirit, we are in the same situation, aren't we?
>
> I don't think it's quite the same....
> ...
> Or are you saying that if all merge strategies return a 2, we just
> treat the last one as good enough and consider the merge to be in
> progress?
No, I was just confusing the difference between the special return
value 2 and a normal failure value 1.
I have a feeling that it would be nice if we can restore to pristine
on the calling "git merge" side, rather than forcing individual
strategy backends to implement the restore-to-pristine correctly,
but in any case, as you said, we should behave as if a merge
strategy backend never run after it failed with exit value 2 by
restoring to pristine state.
next prev parent reply other threads:[~2022-05-13 12:57 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-06 8:14 Question about pre-merge and git merge octopus strategy ZheNing Hu
2022-05-06 17:23 ` Christian Couder
2022-05-07 4:09 ` Elijah Newren
2022-05-07 18:37 ` Junio C Hamano
2022-05-08 14:44 ` ZheNing Hu
2022-05-10 7:07 ` Elijah Newren
2022-05-11 11:21 ` ZheNing Hu
2022-05-12 15:04 ` Elijah Newren
2022-05-12 15:39 ` Junio C Hamano
2022-05-13 5:15 ` Elijah Newren
2022-05-13 12:56 ` Junio C Hamano [this message]
2022-05-19 13:15 ` ZheNing Hu
2022-05-19 14:46 ` Elijah Newren
2022-05-08 14:13 ` ZheNing Hu
2022-05-08 15:01 ` Carlo Marcelo Arenas Belón
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=xmqq35hdd205.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=adlternative@gmail.com \
--cc=christian.couder@gmail.com \
--cc=git@vger.kernel.org \
--cc=newren@gmail.com \
--cc=vascomalmeida@sapo.pt \
/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).