Re: [PATCH v2 4/8] merge-tree: implement real merges
- From
Christian Couder <christian.couder@gmail.com>
- Date
- Jan 7, 2022, 18:12 UTC
- Message-ID
- <CAP8UFD1jTgxCc-r8vzBGUt8SRS=h5jA1KSz6Fw1XpKXB5-XtoQ@mail.gmail.com>
- In-Reply-To
- <1710ba4a9e432e2a854579c4c929e7f2cfc92211.1641403655.git.gitgitgadget@gmail.com>
On Wed, Jan 5, 2022 at 6:27 PM Elijah Newren via GitGitGadget <gitgitgadget@gmail.com> wrote:
> The only output is: > - the toplevel resulting tree printed on stdout > - exit status of 0 (clean) or 1 (conflicts present)
I thought that the merge-ort API could (at least theoretically according to merge-ort.h) return something < 0 in case of internal error. In this case I would be interested in knowing what's the output of the command.
> +The first form will merge the two branches, doing a full recursive > +merge with rename detection. If the merge is clean, the exit status > +will be `0`, and if the merge has conflicts, the exit status will be > +`1`.
No mention of what happens in case of an internal error in the merge-ort API.
> + merge_incore_recursive(&opt, merge_bases, parent1, parent2, &result);
> + printf("%s\n", oid_to_hex(&result.tree->object.oid));
> + merge_switch_to_result(&opt, NULL, &result, 0, 0);
> + return result.clean ? 0 : 1;If result.clean can be < 0, this might pretend that the merge was clean.