diff options
author | Jonathan Nieder <jrnieder@gmail.com> | 2010-12-10 18:51:44 -0600 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-12-28 11:27:56 -0800 |
commit | 67ac1e1d57e45899a4dfd900a0249f48507584b5 (patch) | |
tree | 075c4365710ef649485d83a3ba7add0e04aaa4b1 /builtin/merge.c | |
parent | 73e7b2ef6c62b3ec345b557acb71a8da4798c70d (diff) | |
download | git-67ac1e1d57e45899a4dfd900a0249f48507584b5.tar.gz |
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 <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/merge.c')
-rw-r--r-- | builtin/merge.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/builtin/merge.c b/builtin/merge.c index 42fff387e6..9403747b6a 100644 --- a/builtin/merge.c +++ b/builtin/merge.c @@ -582,7 +582,8 @@ static void write_tree_trivial(unsigned char *sha1) die("git write-tree failed to write a tree"); } -int try_merge_command(const char *strategy, struct commit_list *common, +int try_merge_command(const char *strategy, size_t xopts_nr, + const char **xopts, struct commit_list *common, const char *head_arg, struct commit_list *remotes) { const char **args; @@ -680,7 +681,8 @@ static int try_merge_strategy(const char *strategy, struct commit_list *common, rollback_lock_file(lock); return clean ? 0 : 1; } else { - return try_merge_command(strategy, common, head_arg, remoteheads); + return try_merge_command(strategy, xopts_nr, xopts, + common, head_arg, remoteheads); } } |