Re: [PATCH v8 4/5] rebase -i: support --ignore-date

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 17/08/2020 18:40, Phillip Wood wrote:
> From: Phillip Wood <phillip.wood@xxxxxxxxxxxxx>
> 
> Rebase is implemented with two different backends - 'apply' and
> 'merge' each of which support a different set of options. In
> particular the apply backend supports a number of options implemented
> by 'git am' that are not implemented in the merge backend. This means
> that the available options are different depending on which backend is
> used which is confusing. This patch adds support for the --ignore-date
> option to the merge backend. This option uses the current time as the
> author date rather than reusing the original author date when
> rewriting commits. We take care to handle the combination of
> --ignore-date and --committer-date-is-author-date in the same way as
> the apply backend.
> 
> Original-patch-by: Rohit Ashiwal <rohit.ashiwal265@xxxxxxxxx>
> Signed-off-by: Phillip Wood <phillip.wood@xxxxxxxxxxxxx>
> ---
>  Documentation/git-rebase.txt   |  7 ++--
>  builtin/rebase.c               | 13 ++++---
>  sequencer.c                    | 66 +++++++++++++++++++++++++++-------
>  sequencer.h                    |  1 +
>  t/t3436-rebase-more-options.sh | 56 +++++++++++++++++++++++++++++
>  5 files changed, 123 insertions(+), 20 deletions(-)
> 
>  [...]
> diff --git a/t/t3436-rebase-more-options.sh b/t/t3436-rebase-more-options.sh
> index 50a63d8ebe..0ede2b8900 100755
> --- a/t/t3436-rebase-more-options.sh
> +++ b/t/t3436-rebase-more-options.sh
> @@ -108,6 +108,62 @@ test_expect_success '--committer-date-is-author-date works when committing confl
>  	test_ctime_is_atime -1
>  '
>  
> +# Checking for +0000 in the author date is sufficient since the
> +# default timezone is UTC but the timezone used while committing is
> +# +0530. The inverted logic in the grep is necessary to check all the
> +# author dates in the file.
> +test_ctime_is_ignored () {
> +	git log $1 --format=%ai >authortime &&
> +	! grep -v +0000 authortime
> +}


I don't know what I was thinking when I wrote that - it should be called
test_atime_is_ignored() as it's testing the author date

Best Wishes

Phillip



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux