aboutsummaryrefslogtreecommitdiff
path: root/builtin/revert.c
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2010-08-05 06:32:41 -0500
committerJunio C Hamano <gitster@pobox.com>2010-08-06 09:20:02 -0700
commit7610fa57e63b0acc0a66717fc2d85755634db591 (patch)
tree068161cdd6ca96746439efda939c4d15beba190d /builtin/revert.c
parentff8ba59e7b015ba96d6a3271000f16aa71dc4a6f (diff)
downloadgit-7610fa57e63b0acc0a66717fc2d85755634db591.tar.gz
git-7610fa57e63b0acc0a66717fc2d85755634db591.tar.xz
merge-recursive --renormalize
Teach "git merge-recursive" a --renormalize option to enable the merge.renormalize configuration. The --no-renormalize option can be used to override it in the negative. So in the future, you might be able to, e.g.: git checkout -m -Xrenormalize otherbranch or git revert -Xrenormalize otherpatch or git pull --rebase -Xrenormalize The bad part: merge.renormalize is still not honored for most commands. And it reveals lots of places that -X has not been plumbed in (so we get "git merge -Xrenormalize" but not much else). NEEDSWORK: tests Cc: Eyvind Bernhardsen <eyvind.bernhardsen@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/revert.c')
-rw-r--r--builtin/revert.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/builtin/revert.c b/builtin/revert.c
index 853e9e406..11132533c 100644
--- a/builtin/revert.c
+++ b/builtin/revert.c
@@ -318,6 +318,13 @@ static void do_recursive_merge(struct commit *base, struct commit *next,
index_fd = hold_locked_index(&index_lock, 1);
read_cache();
+
+ /*
+ * NEEDSWORK: cherry-picking between branches with
+ * different end-of-line normalization is a pain;
+ * plumb in an option to set o.renormalize?
+ * (or better: arbitrary -X options)
+ */
init_merge_options(&o);
o.ancestor = base ? base_label : "(empty tree)";
o.branch1 = "HEAD";