diff options
author | Kyle Zhao <kylezhao@tencent.com> | 2022-11-11 23:45:14 +0000 |
---|---|---|
committer | Taylor Blau <me@ttaylorr.com> | 2022-11-12 23:53:04 -0500 |
commit | 501e3bab99da75eada3e2d6ef5257a3c44dd1ae4 (patch) | |
tree | 48960fa73682627890ed48879436e303b2ffff50 /Documentation/git-merge-tree.txt | |
parent | 66265a693e8deb3ab86577eb7f69940410044081 (diff) | |
download | git-501e3bab99da75eada3e2d6ef5257a3c44dd1ae4.tar.gz |
merge-tree.c: allow specifying the merge-base when --stdin is passed
The previous commit added a `--merge-base` option in order to allow
using a specified merge-base for the merge. Extend the input accepted
by `--stdin` to also allow a specified merge-base with each merge
requested. For example:
printf "<b3> -- <b1> <b2>" | git merge-tree --stdin
does a merge of b1 and b2, and uses b3 as the merge-base.
Signed-off-by: Kyle Zhao <kylezhao@tencent.com>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Diffstat (limited to 'Documentation/git-merge-tree.txt')
-rw-r--r-- | Documentation/git-merge-tree.txt | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Documentation/git-merge-tree.txt b/Documentation/git-merge-tree.txt index d9dacb2ce5..298c133fdb 100644 --- a/Documentation/git-merge-tree.txt +++ b/Documentation/git-merge-tree.txt @@ -66,7 +66,8 @@ OPTIONS --merge-base=<commit>:: Instead of finding the merge-bases for <branch1> and <branch2>, - specify a merge-base for the merge. + specify a merge-base for the merge. This option is incompatible + with `--stdin`. [[OUTPUT]] OUTPUT @@ -220,6 +221,17 @@ with linkgit:git-merge[1]: * any messages that would have been printed to stdout (the <<IM,Informational messages>>) +INPUT FORMAT +------------ +'git merge-tree --stdin' input format is fully text based. Each line +has this format: + + [<base-commit> -- ]<branch1> <branch2> + +If one line is separated by `--`, the string before the separator is +used for specifying a merge-base for the merge and the string after +the separator describes the branches to be merged. + MISTAKES TO AVOID ----------------- |