@@ -79,11 +79,8 @@ struct rebase_options {
79
79
int allow_rerere_autoupdate ;
80
80
int keep_empty ;
81
81
int autosquash ;
82
- int ignore_whitespace ;
83
82
char * gpg_sign_opt ;
84
83
int autostash ;
85
- int committer_date_is_author_date ;
86
- int ignore_date ;
87
84
char * cmd ;
88
85
int allow_empty_message ;
89
86
int rebase_merges , rebase_cousins ;
@@ -102,7 +99,6 @@ struct rebase_options {
102
99
103
100
static struct replay_opts get_replay_opts (const struct rebase_options * opts )
104
101
{
105
- struct strbuf strategy_buf = STRBUF_INIT ;
106
102
struct replay_opts replay = REPLAY_OPTS_INIT ;
107
103
108
104
replay .action = REPLAY_INTERACTIVE_REBASE ;
@@ -116,20 +112,10 @@ static struct replay_opts get_replay_opts(const struct rebase_options *opts)
116
112
replay .allow_empty_message = opts -> allow_empty_message ;
117
113
replay .verbose = opts -> flags & REBASE_VERBOSE ;
118
114
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 ;
122
115
replay .gpg_sign = xstrdup_or_null (opts -> gpg_sign_opt );
123
116
replay .strategy = opts -> strategy ;
124
-
125
117
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 );
133
119
134
120
if (opts -> squash_onto ) {
135
121
oidcpy (& replay .squash_onto , opts -> squash_onto );
@@ -531,8 +517,6 @@ int cmd_rebase__interactive(int argc, const char **argv, const char *prefix)
531
517
argc = parse_options (argc , argv , prefix , options ,
532
518
builtin_rebase_interactive_usage , PARSE_OPT_KEEP_ARGV0 );
533
519
534
- opts .strategy_opts = xstrdup_or_null (opts .strategy_opts );
535
-
536
520
if (!is_null_oid (& squash_onto ))
537
521
opts .squash_onto = & squash_onto ;
538
522
@@ -986,12 +970,6 @@ static int run_am(struct rebase_options *opts)
986
970
am .git_cmd = 1 ;
987
971
argv_array_push (& am .args , "am" );
988
972
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" );
995
973
if (opts -> action && !strcmp ("continue" , opts -> action )) {
996
974
argv_array_push (& am .args , "--resolved" );
997
975
argv_array_pushf (& am .args , "--resolvemsg=%s" , resolvemsg );
@@ -1459,17 +1437,16 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
1459
1437
PARSE_OPT_NOARG , NULL , REBASE_DIFFSTAT },
1460
1438
OPT_BOOL (0 , "signoff" , & options .signoff ,
1461
1439
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 ),
1469
1448
OPT_PASSTHRU_ARGV ('C' , NULL , & options .git_am_opts , N_ ("n" ),
1470
1449
N_ ("passed to 'git apply'" ), 0 ),
1471
- OPT_BOOL (0 , "ignore-whitespace" , & options .ignore_whitespace ,
1472
- N_ ("ignore changes in whitespace" )),
1473
1450
OPT_PASSTHRU_ARGV (0 , "whitespace" , & options .git_am_opts ,
1474
1451
N_ ("action" ), N_ ("passed to 'git apply'" ), 0 ),
1475
1452
OPT_BIT ('f' , "force-rebase" , & options .flags ,
@@ -1742,13 +1719,11 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
1742
1719
state_dir_base , cmd_live_rebase , buf .buf );
1743
1720
}
1744
1721
1745
- if (options .committer_date_is_author_date ||
1746
- options .ignore_date )
1747
- options .flags |= REBASE_FORCE ;
1748
-
1749
1722
for (i = 0 ; i < options .git_am_opts .argc ; i ++ ) {
1750
1723
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" ) ||
1752
1727
!strcmp (option , "--whitespace=strip" ))
1753
1728
options .flags |= REBASE_FORCE ;
1754
1729
else if (skip_prefix (option , "-C" , & p )) {
0 commit comments