path: root/builtin/checkout.c
diff options
authorJonathan Nieder <>2010-08-05 11:32:41 (GMT)
committerJunio C Hamano <>2010-08-06 16:20:02 (GMT)
commit7610fa57e63b0acc0a66717fc2d85755634db591 (patch)
tree068161cdd6ca96746439efda939c4d15beba190d /builtin/checkout.c
parentff8ba59e7b015ba96d6a3271000f16aa71dc4a6f (diff)
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 <> Signed-off-by: Jonathan Nieder <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'builtin/checkout.c')
1 files changed, 7 insertions, 0 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c
index a0c00d3..24b67d5 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -437,6 +437,13 @@ static int merge_working_tree(struct checkout_opts *opts,
add_files_to_cache(NULL, NULL, 0);
+ /*
+ * NEEDSWORK: carrying over local changes
+ * when branches have different end-of-line
+ * normalization (or clean+smudge rules) is
+ * a pain; plumb in an option to set
+ * o.renormalize?
+ */
o.verbosity = 0;
work = write_tree_from_memory(&o);