rebase -i: support --ignore-date

Rebase is implemented with two different backends - 'apply' and
'merge' each of which support a different set of options. In
particular the apply backend supports a number of options implemented
by 'git am' that are not implemented in the merge backend. This means
that the available options are different depending on which backend is
used which is confusing. This patch adds support for the --ignore-date
option to the merge backend. This option uses the current time as the
author date rather than reusing the original author date when
rewriting commits. We take care to handle the combination of
--ignore-date and --committer-date-is-author-date in the same way as
the apply backend.

Original-patch-by: Rohit Ashiwal <rohit.ashiwal265@gmail.com>
Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Phillip Wood
2020-08-17 18:40:03 +01:00
committed by Junio C Hamano
parent 7573cec52c
commit a3894aad67
5 changed files with 123 additions and 20 deletions

View File

@ -46,6 +46,7 @@ struct replay_opts {
int quiet;
int reschedule_failed_exec;
int committer_date_is_author_date;
int ignore_date;
int mainline;