126
replay.reschedule_failed_exec = opts->reschedule_failed_exec;
127
replay.gpg_sign = xstrdup_or_null(opts->gpg_sign_opt);
128
replay.strategy = opts->strategy;
129
+
130
if (opts->strategy_opts)
131
parse_strategy_opts(&replay, opts->strategy_opts);
132
1467
struct strbuf revisions = STRBUF_INIT;
1468
struct strbuf buf = STRBUF_INIT;
1469
struct object_id merge_base;
1470
+ int ignore_whitespace = 0;
1471
enum action action = ACTION_NONE;
1472
const char *gpg_sign = NULL;
1473
struct string_list exec = STRING_LIST_INIT_NODUP;
1497
PARSE_OPT_NOARG, NULL, REBASE_DIFFSTAT },
1498
OPT_BOOL(0, "signoff", &options.signoff,
1499
N_("add a Signed-off-by: line to each commit")),
1498
- OPT_PASSTHRU_ARGV(0, "ignore-whitespace", &options.git_am_opts,
1499
- NULL, N_("passed to 'git am'"),
1500
- PARSE_OPT_NOARG),
1500
OPT_PASSTHRU_ARGV(0, "committer-date-is-author-date",
1501
&options.git_am_opts, NULL,
1502
N_("passed to 'git am'"), PARSE_OPT_NOARG),
1504
N_("passed to 'git am'"), PARSE_OPT_NOARG),
1505
OPT_PASSTHRU_ARGV('C', NULL, &options.git_am_opts, N_("n"),
1506
N_("passed to 'git apply'"), 0),
1507
+ OPT_BOOL(0, "ignore-whitespace", &ignore_whitespace,
1508
+ N_("ignore changes in whitespace")),
1509
OPT_PASSTHRU_ARGV(0, "whitespace", &options.git_am_opts,
1510
N_("action"), N_("passed to 'git apply'"), 0),
1511
OPT_BIT('f', "force-rebase", &options.flags,
1851
imply_merge(&options, "--rebase-merges");
1852
}
1853
1854
+ if (options.type == REBASE_APPLY) {
1855
+ if (ignore_whitespace)
1856
+ argv_array_push(&options.git_am_opts,
1857
+ "--ignore-whitespace");
1858
+ } else {
1859
+ /* REBASE_MERGE and PRESERVE_MERGES */
1860
+ if (ignore_whitespace) {
1861
+ string_list_append(&strategy_options,
1862
+ "ignore-space-change");
1863
+ }
1864
+ }
1865
+
1866
if (strategy_options.nr) {
1867
int i;
1868