author | Junio C Hamano <gitster@pobox.com> | |
Tue, 1 Jul 2008 05:18:57 +0000 (22:18 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 18 Jan 2010 06:46:28 +0000 (22:46 -0800) | ||
commit | 85e51b783c3a92b42275442147e7a27e17d42276 | |
tree | e573051e14e607133f2914b5f08ac26fc74ab17d | tree | snapshot |
parent | 14e5d40ca4f4f118fe03cbe5302309170b46096d | commit | diff |
Make "subtree" part more orthogonal to the rest of merge-recursive.
This makes "subtree" more orthogonal to the rest of recursive merge, so
that you can use subtree and ours/theirs features at the same time. For
example, you can now say:
git merge -s subtree -Xtheirs other
to merge with "other" branch while shifting it up or down to match the
shape of the tree of the current branch, and resolving conflicts favoring
the changes "other" branch made over changes made in the current branch.
It also allows the prefix used to shift the trees to be specified using
the "-Xsubtree=$prefix" option. Giving an empty prefix tells the command
to figure out how much to shift trees automatically as we have always
done. "merge -s subtree" is the same as "merge -s recursive -Xsubtree="
(or "merge -s recursive -Xsubtree").
Based on an old patch done back in the days when git-merge was a script;
Avery ported the script part to builtin-merge.c. Bugs in shift_tree()
is mine.
Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This makes "subtree" more orthogonal to the rest of recursive merge, so
that you can use subtree and ours/theirs features at the same time. For
example, you can now say:
git merge -s subtree -Xtheirs other
to merge with "other" branch while shifting it up or down to match the
shape of the tree of the current branch, and resolving conflicts favoring
the changes "other" branch made over changes made in the current branch.
It also allows the prefix used to shift the trees to be specified using
the "-Xsubtree=$prefix" option. Giving an empty prefix tells the command
to figure out how much to shift trees automatically as we have always
done. "merge -s subtree" is the same as "merge -s recursive -Xsubtree="
(or "merge -s recursive -Xsubtree").
Based on an old patch done back in the days when git-merge was a script;
Avery ported the script part to builtin-merge.c. Bugs in shift_tree()
is mine.
Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-merge-recursive.c | diff | blob | history | |
builtin-merge.c | diff | blob | history | |
cache.h | diff | blob | history | |
match-trees.c | diff | blob | history | |
merge-recursive.c | diff | blob | history | |
merge-recursive.h | diff | blob | history |