Skip to content

Commit

Permalink
rebase: add --reset-author-date
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
r1walz authored and gitster committed Nov 2, 2019
1 parent 08187b4 commit fe28ad8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions Documentation/git-rebase.txt
Expand Up @@ -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.
+
Expand Down
2 changes: 2 additions & 0 deletions builtin/rebase.c
Expand Up @@ -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"),
Expand Down

0 comments on commit fe28ad8

Please sign in to comment.