From 67ac1e1d57e45899a4dfd900a0249f48507584b5 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Fri, 10 Dec 2010 18:51:44 -0600 Subject: cherry-pick/revert: add support for -X/--strategy-option For example, this would allow cherry-picking or reverting patches from a piece of history with a different end-of-line style, like so: $ git revert -Xrenormalize old-problematic-commit Currently that is possible with manual use of merge-recursive but the cherry-pick/revert porcelain does not expose the functionality. While at it, document the existing support for --strategy. Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- Documentation/git-cherry-pick.txt | 32 ++++++++++++++++++++++++++++++++ Documentation/git-revert.txt | 10 ++++++++++ builtin/merge.c | 6 ++++-- builtin/revert.c | 29 ++++++++++++++++++++++------- contrib/examples/git-revert.sh | 13 ++++++++++++- merge-recursive.h | 4 +++- t/t3032-merge-recursive-options.sh | 14 ++++++++++++++ 7 files changed, 97 insertions(+), 11 deletions(-) diff --git a/Documentation/git-cherry-pick.txt b/Documentation/git-cherry-pick.txt index 73008705eb..749d68a72b 100644 --- a/Documentation/git-cherry-pick.txt +++ b/Documentation/git-cherry-pick.txt @@ -79,6 +79,16 @@ effect to your index in a row. cherry-pick'ed commit, then a fast forward to this commit will be performed. +--strategy=:: + Use the given merge strategy. Should only be used once. + See the MERGE STRATEGIES section in linkgit:git-merge[1] + for details. + +-X