Message ID | 20191101140003.13960-7-rohit.ashiwal265@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | rebase -i: support more options | expand |
Rohit Ashiwal <rohit.ashiwal265@gmail.com> writes: > --ignore-date:: > +--reset-author-date:: > Instead of using the given author date, reset it to the > current time. This implies --force-rebase. > + > diff --git a/builtin/rebase.c b/builtin/rebase.c > index 7edae668f8..edefdd016b 100644 > --- a/builtin/rebase.c > +++ b/builtin/rebase.c > @@ -1455,6 +1455,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"), One of them should say it is a mere synonym to the other (or hide from the "git rebase -h" listing altogether). Otherwise readers would be puzzled what the difference between the two are. Thanks.
diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index 3580447f2f..cb4ab43998 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@ -413,6 +413,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. + diff --git a/builtin/rebase.c b/builtin/rebase.c index 7edae668f8..edefdd016b 100644 --- a/builtin/rebase.c +++ b/builtin/rebase.c @@ -1455,6 +1455,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"),
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(+)