diff mbox series

[GSoC,PATCHl,6/6] rebase: add --author-date-is-committer-date

Message ID 20190806173638.17510-7-rohit.ashiwal265@gmail.com (mailing list archive)
State New, archived
Headers show
Series rebase -i: support more options | expand

Commit Message

Rohit Ashiwal Aug. 6, 2019, 5:36 p.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(+)

Comments

Phillip Wood Aug. 8, 2019, 11:42 a.m. UTC | #1
Hi Rohit

On 06/08/2019 18:36, Rohit Ashiwal wrote:
> 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.

That's an excellent idea

Best Wishes

Phillip

> 
> Signed-off-by: Rohit Ashiwal <rohit.ashiwal265@gmail.com>
> ---
>   Documentation/git-rebase.txt | 1 +
>   builtin/rebase.c             | 2 ++
>   2 files changed, 3 insertions(+)
> 
> diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt
> index a5cdf8518b..bb60426911 100644
> --- a/Documentation/git-rebase.txt
> +++ b/Documentation/git-rebase.txt
> @@ -388,6 +388,7 @@ See also INCOMPATIBLE OPTIONS below.
>   	as the committer date. This implies --force-rebase.
>   
>   --ignore-date::
> +--author-date-is-committer-date::
>   	Lie about the author date by re-setting it to the value
>   	same as committer (current) date. This implies --force-rebase.
>   +
> diff --git a/builtin/rebase.c b/builtin/rebase.c
> index 7f464fc9ba..a9a42f9ee4 100644
> --- a/builtin/rebase.c
> +++ b/builtin/rebase.c
> @@ -1433,6 +1433,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, "author-date-is-committer-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"),
>
diff mbox series

Patch

diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt
index a5cdf8518b..bb60426911 100644
--- a/Documentation/git-rebase.txt
+++ b/Documentation/git-rebase.txt
@@ -388,6 +388,7 @@  See also INCOMPATIBLE OPTIONS below.
 	as the committer date. This implies --force-rebase.
 
 --ignore-date::
+--author-date-is-committer-date::
 	Lie about the author date by re-setting it to the value
 	same as committer (current) date. This implies --force-rebase.
 +
diff --git a/builtin/rebase.c b/builtin/rebase.c
index 7f464fc9ba..a9a42f9ee4 100644
--- a/builtin/rebase.c
+++ b/builtin/rebase.c
@@ -1433,6 +1433,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, "author-date-is-committer-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"),