Re: [PATCH v2 4/8] merge-tree: implement real merges

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 5, 2022 at 6:27 PM Elijah Newren via GitGitGadget
<gitgitgadget@xxxxxxxxx> 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.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux