]> Kevux Git Server - rit/commit
merge-tree.c: add --merge-base=<commit> option
authorKyle Zhao <kylezhao@tencent.com>
Fri, 11 Nov 2022 23:45:13 +0000 (23:45 +0000)
committerTaylor Blau <me@ttaylorr.com>
Sun, 13 Nov 2022 04:53:04 +0000 (23:53 -0500)
commit66265a693e8deb3ab86577eb7f69940410044081
treed2efd3dba5320d5efb55dade00c4ea9161e748bc
parentec1edbcb56ac05e9980299b05924c5c1b51d68b4
merge-tree.c: add --merge-base=<commit> option

This patch will give our callers more flexibility to use `git merge-tree`,
such as:

    git merge-tree --write-tree --merge-base=branch^ HEAD branch

This does a merge of HEAD and branch, but uses branch^ as the merge-base.

And the reason why using an option flag instead of a positional argument
is to allow additional commits passed to merge-tree to be handled via an
octopus merge in the future.

Signed-off-by: Kyle Zhao <kylezhao@tencent.com>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Documentation/git-merge-tree.txt
builtin/merge-tree.c
t/t4301-merge-tree-write-tree.sh