]> git.ipfire.org Git - thirdparty/git.git/commitdiff
rebase: add --reset-author-date
authorRohit Ashiwal <rohit.ashiwal265@gmail.com>
Fri, 1 Nov 2019 14:00:03 +0000 (19:30 +0530)
committerJunio C Hamano <gitster@pobox.com>
Sat, 2 Nov 2019 06:37:12 +0000 (15:37 +0900)
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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-rebase.txt
builtin/rebase.c

index 9a1eabad0f26f79d4bc7f09767175da7238cd1d2..c8d54d221d9fca1718ad5b14e6f744a00d772d4c 100644 (file)
@@ -391,6 +391,7 @@ See also INCOMPATIBLE OPTIONS below.
        as the committer date. This implies --force-rebase.
 
 --ignore-date::
+--reset-author-date::
        Instead of using the given author date, reset it to the
        current time. This implies --force-rebase.
 +
index b7d3de1a0f97b803cce44e282a3cbe3cf1b82cf7..44768082b88d0eaf1ab1f78584bb8eb4d234c6e0 100644 (file)
@@ -1436,6 +1436,8 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
                OPT_BOOL(0, "committer-date-is-author-date",
                         &options.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"),