[v4,6/6] rebase: add --reset-author-date
diff mbox series

Message ID 20190907115034.14933-7-rohit.ashiwal265@gmail.com
State New
Headers show
  • rebase -i: support more options
Related show

Commit Message

Rohit Ashiwal Sept. 7, 2019, 11:50 a.m. UTC
The previous commit introduced --ignore-date flag to interactive
rebase, but the name is actually very vague in context of rebase -i
since there are two dates we can work with. Add an alias to convey
the precise purpose.

Signed-off-by: Rohit Ashiwal <rohit.ashiwal265@gmail.com>
 Documentation/git-rebase.txt | 1 +
 builtin/rebase.c             | 2 ++
 2 files changed, 3 insertions(+)

diff mbox series

diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt
index e7ac9fae0b..ec62ba36b8 100644
--- a/Documentation/git-rebase.txt
+++ b/Documentation/git-rebase.txt
@@ -391,6 +391,7 @@  See also INCOMPATIBLE OPTIONS below.
 	as the committer date. This implies --force-rebase.
 	Instead of using the given author date, reset it to the value
 	same as the current time. This implies --force-rebase.
diff --git a/builtin/rebase.c b/builtin/rebase.c
index e6f90f61dd..57e411dd59 100644
--- a/builtin/rebase.c
+++ b/builtin/rebase.c
@@ -1431,6 +1431,8 @@  int cmd_rebase(int argc, const char **argv, const char *prefix)
 		OPT_BOOL(0, "committer-date-is-author-date",
 			 N_("make committer date match author date")),
+		OPT_BOOL(0, "reset-author-date", &options.ignore_date,
+			 "ignore author date and use current date"),
 		OPT_BOOL(0, "ignore-date", &options.ignore_date,
 			 "ignore author date and use current date"),
 		OPT_PASSTHRU_ARGV('C', NULL, &options.git_am_opts, N_("n"),