@@ -79,11 +79,8 @@ struct rebase_options {
7979 int allow_rerere_autoupdate ;
8080 int keep_empty ;
8181 int autosquash ;
82- int ignore_whitespace ;
8382 char * gpg_sign_opt ;
8483 int autostash ;
85- int committer_date_is_author_date ;
86- int ignore_date ;
8784 char * cmd ;
8885 int allow_empty_message ;
8986 int rebase_merges , rebase_cousins ;
@@ -102,7 +99,6 @@ struct rebase_options {
10299
103100static struct replay_opts get_replay_opts (const struct rebase_options * opts )
104101{
105- struct strbuf strategy_buf = STRBUF_INIT ;
106102 struct replay_opts replay = REPLAY_OPTS_INIT ;
107103
108104 replay .action = REPLAY_INTERACTIVE_REBASE ;
@@ -116,20 +112,10 @@ static struct replay_opts get_replay_opts(const struct rebase_options *opts)
116112 replay .allow_empty_message = opts -> allow_empty_message ;
117113 replay .verbose = opts -> flags & REBASE_VERBOSE ;
118114 replay .reschedule_failed_exec = opts -> reschedule_failed_exec ;
119- replay .committer_date_is_author_date =
120- opts -> committer_date_is_author_date ;
121- replay .ignore_date = opts -> ignore_date ;
122115 replay .gpg_sign = xstrdup_or_null (opts -> gpg_sign_opt );
123116 replay .strategy = opts -> strategy ;
124-
125117 if (opts -> strategy_opts )
126- strbuf_addstr (& strategy_buf , opts -> strategy_opts );
127- if (opts -> ignore_whitespace )
128- strbuf_addstr (& strategy_buf , " --ignore-space-change" );
129- if (strategy_buf .len )
130- parse_strategy_opts (& replay , strategy_buf .buf );
131-
132- strbuf_release (& strategy_buf );
118+ parse_strategy_opts (& replay , opts -> strategy_opts );
133119
134120 if (opts -> squash_onto ) {
135121 oidcpy (& replay .squash_onto , opts -> squash_onto );
@@ -531,8 +517,6 @@ int cmd_rebase__interactive(int argc, const char **argv, const char *prefix)
531517 argc = parse_options (argc , argv , prefix , options ,
532518 builtin_rebase_interactive_usage , PARSE_OPT_KEEP_ARGV0 );
533519
534- opts .strategy_opts = xstrdup_or_null (opts .strategy_opts );
535-
536520 if (!is_null_oid (& squash_onto ))
537521 opts .squash_onto = & squash_onto ;
538522
@@ -986,12 +970,6 @@ static int run_am(struct rebase_options *opts)
986970 am .git_cmd = 1 ;
987971 argv_array_push (& am .args , "am" );
988972
989- if (opts -> ignore_whitespace )
990- argv_array_push (& am .args , "--ignore-whitespace" );
991- if (opts -> committer_date_is_author_date )
992- argv_array_push (& opts -> git_am_opts , "--committer-date-is-author-date" );
993- if (opts -> ignore_date )
994- argv_array_push (& opts -> git_am_opts , "--ignore-date" );
995973 if (opts -> action && !strcmp ("continue" , opts -> action )) {
996974 argv_array_push (& am .args , "--resolved" );
997975 argv_array_pushf (& am .args , "--resolvemsg=%s" , resolvemsg );
@@ -1459,17 +1437,16 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
14591437 PARSE_OPT_NOARG , NULL , REBASE_DIFFSTAT },
14601438 OPT_BOOL (0 , "signoff" , & options .signoff ,
14611439 N_ ("add a Signed-off-by: line to each commit" )),
1462- OPT_BOOL (0 , "committer-date-is-author-date" ,
1463- & options .committer_date_is_author_date ,
1464- N_ ("make committer date match author date" )),
1465- OPT_BOOL (0 , "reset-author-date" , & options .ignore_date ,
1466- N_ ("ignore author date and use current date" )),
1467- OPT_HIDDEN_BOOL (0 , "ignore-date" , & options .ignore_date ,
1468- N_ ("synonym of --reset-author-date" )),
1440+ OPT_PASSTHRU_ARGV (0 , "ignore-whitespace" , & options .git_am_opts ,
1441+ NULL , N_ ("passed to 'git am'" ),
1442+ PARSE_OPT_NOARG ),
1443+ OPT_PASSTHRU_ARGV (0 , "committer-date-is-author-date" ,
1444+ & options .git_am_opts , NULL ,
1445+ N_ ("passed to 'git am'" ), PARSE_OPT_NOARG ),
1446+ OPT_PASSTHRU_ARGV (0 , "ignore-date" , & options .git_am_opts , NULL ,
1447+ N_ ("passed to 'git am'" ), PARSE_OPT_NOARG ),
14691448 OPT_PASSTHRU_ARGV ('C' , NULL , & options .git_am_opts , N_ ("n" ),
14701449 N_ ("passed to 'git apply'" ), 0 ),
1471- OPT_BOOL (0 , "ignore-whitespace" , & options .ignore_whitespace ,
1472- N_ ("ignore changes in whitespace" )),
14731450 OPT_PASSTHRU_ARGV (0 , "whitespace" , & options .git_am_opts ,
14741451 N_ ("action" ), N_ ("passed to 'git apply'" ), 0 ),
14751452 OPT_BIT ('f' , "force-rebase" , & options .flags ,
@@ -1742,13 +1719,11 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
17421719 state_dir_base , cmd_live_rebase , buf .buf );
17431720 }
17441721
1745- if (options .committer_date_is_author_date ||
1746- options .ignore_date )
1747- options .flags |= REBASE_FORCE ;
1748-
17491722 for (i = 0 ; i < options .git_am_opts .argc ; i ++ ) {
17501723 const char * option = options .git_am_opts .argv [i ], * p ;
1751- if (!strcmp (option , "--whitespace=fix" ) ||
1724+ if (!strcmp (option , "--committer-date-is-author-date" ) ||
1725+ !strcmp (option , "--ignore-date" ) ||
1726+ !strcmp (option , "--whitespace=fix" ) ||
17521727 !strcmp (option , "--whitespace=strip" ))
17531728 options .flags |= REBASE_FORCE ;
17541729 else if (skip_prefix (option , "-C" , & p )) {
0 commit comments