Re: [PATCH v3 04/15] merge-tree: implement real merges
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 3, 2022, 20:05 UTC
- Message-ID
- <xmqqee4jsokt.fsf@gitster.g>
- In-Reply-To
- <20220203104241.yvfragan6ucecfjl@gmail.com>
Johannes Altmanninger <aclopte@gmail.com> writes:
> I wonder how the UI of a tool that does non-worktree/non-index cherry-picks > will look like. I'd expect it to produce the same output as merge-tree, > except cherry-pick should probably output a commit OID, not a tree.
A tool that creates a "merge", "cherry-pick" and "revert" should all output a resulting commit object name, not a tree object.
And "merge-tree" that creates a three-way merge to apply a change to go from tree A to tree B on top of tree X should take three tree-ish object names and produce a resulting one tree object name.
Using the "merge-tree" that merges two trees using the third tree as a common ancestor, these three higher-level tools can perform "merge", "cherry-pick", and "revert". They would all take two commit objects and produce one commit object.