Re: [PATCH v2 4/8] merge-tree: implement real merges
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 7, 2022, 20:56 UTC
- Message-ID
- <xmqqmtk78dty.fsf@gitster.g>
- In-Reply-To
- <CABPp-BFUJ6pU_CKM7ccnFvi0nkeeGfd2GETdksKLaz=B_=BZAQ@mail.gmail.com>
Elijah Newren <newren@gmail.com> writes:
Show 7 quoted lines
>> 'git merge-tree' [--write-tree] <branch1> <branch2> >> 'git merge-tree' [--demo-trivial-merge] <base-tree> <branch1> <branch2> >> >> That way, the old mode can still function, and can even at some stage be >> deprecated and eventually removed. > > Ooh, interesting.
I wondered if we can _also_ extend the trivial-merge mode so that we do not have to call it "demo".
The internal result is expressed in this way:
struct merge_list {
struct merge_list *next;
struct merge_list *link; /* other stages for this object */ unsigned int stage : 2;
unsigned int mode;
const char *path;
struct blob *blob;
};because the command was not designed to resolve content level merges, but show the half-resolved state with the "stage" number. The "explanation" the command gives on the result is truly trivial, but there is no reason for it to stay that way.