From: Edmundo Carmona Antoranz <eantoranz@gmail.com>
To: Elijah Newren <newren@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [RFC PATCH] sequencer - tipped merge strategy
Date: Sun, 5 Mar 2023 15:00:39 +0100 [thread overview]
Message-ID: <CAOc6etawNSEjwt9QsJE90ok5pJjf4xOJ6ZaFr9HkHu3+Sw89+A@mail.gmail.com> (raw)
In-Reply-To: <CABPp-BGOtsjgfN5f=dSb0ZSEx8nzFs6SKrUm=2TtPPH5cKa4cA@mail.gmail.com>
Hey, Elijah!
Thank you for all of that feedback. Really good Will need to go
through it which will take me some time to digest but I did want to go
over one of the subjects.
> So, if I'm reading correctly (please double check me), since your
> merge strategy made no changes to the index or working tree, and
> returned a status of 2, and since !2 == !1 == 0, we'll treat this the
> same as a successful merge and commit the "results", i.e. the tree of
> the first parent. Doesn't this tipped merge strategy thus behave the
> same as a `--strategy ours` merge when its preconditions are not
> satisfied? If it does, that would be horrifying.
I think that is not correct. The possible values that come out of
try_tms_merge are 0 if nothing happened and 1 if the merge was
successful and we changed the index and the working tree. Then I think
I wrote this correctly following the call:
if (ret) {
discard_index(r->index);
if (repo_read_index(r) < 0) {
ret = error(_("could not read index"));
goto leave_merge;
}
goto ran_merge;
}
// regain lock to go into recursive
if (repo_hold_locked_index(r, &lock, LOCK_REPORT_ON_ERROR) < 0) {
ret = -1;
goto leave_merge;
}
Actually, if we will be switching to using a library, then this won't
be that important because we might be able to pull it off without
having to release the lock given that we would be running in-process,
but I wanted to clear up what the intended flow is there, just in
case.
Ok.... more questions or comments will be coming in the following
days. And thank you, again.
BR!
next prev parent reply other threads:[~2023-03-05 14:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-03 14:53 [RFC PATCH] sequencer - tipped merge strategy Edmundo Carmona Antoranz
2023-03-03 16:45 ` Junio C Hamano
2023-03-04 11:45 ` Edmundo Carmona Antoranz
2023-03-04 11:47 ` Edmundo Carmona Antoranz
2023-03-04 20:36 ` Elijah Newren
2023-03-05 13:40 ` Edmundo Carmona Antoranz
2023-03-04 20:31 ` Elijah Newren
2023-03-05 14:00 ` Edmundo Carmona Antoranz [this message]
2023-03-06 17:32 ` 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=CAOc6etawNSEjwt9QsJE90ok5pJjf4xOJ6ZaFr9HkHu3+Sw89+A@mail.gmail.com \
--to=eantoranz@gmail.com \
--cc=git@vger.kernel.org \
--cc=newren@gmail.com \
/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 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 NNTP newsgroup(s).