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

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

 



Hi Phillip,

On 2020-05-21 11:14:54+0100, Phillip Wood <phillip.wood123@xxxxxxxxx> wrote:
> +# Checking for +0000 in author time is enough since default
> +# timezone is UTC, but the timezone used while committing
> +# sets to +0530.
> +test_expect_success '--ignore-date works with apply backend' '
> +	git commit --amend --date="$GIT_AUTHOR_DATE" &&
> +	git rebase --apply --ignore-date HEAD^ &&
> +	git log -1 --pretty="format:%ai" >authortime &&

Those --pretty="format:%ai" won't print the newline character in my
test environment.
It looks like it won't print the newline if stdout isn't a tty.

	git log -1 --pretty=%ai

doesn't have that issue.

I think there're some grep out there considers file doesn't end with
newline as non-text files.

> +	grep "+0000" authortime
> +'
> +
> +test_expect_success '--ignore-date works with merge backend' '
> +	git commit --amend --date="$GIT_AUTHOR_DATE" &&
> +	git rebase --ignore-date -m HEAD^ &&
> +	git log -1 --pretty="format:%ai" >authortime &&
> +	grep "+0000" authortime
> +'
> +
> +test_expect_success '--ignore-date works after conflict resolution' '
> +	test_must_fail git rebase --ignore-date -m \
> +		--onto commit2^^ commit2^ commit2 &&
> +	echo resolved >foo &&
> +	git add foo &&
> +	git rebase --continue &&
> +	git log --pretty=%ai >authortime &&
> +	grep +0000 authortime
> +'

>From the test's name, I guess git-rebase is supposed to continue
respect --ignore-date after conflict resolution.

But the content of authortime read:

	2020-05-23 12:13:58 +0000
	1999-04-02 08:03:20 +0530
	1999-04-02 08:03:20 +0530

It's still pass "grep +0000 authortime" because of first line,
I'm not sure if I missed anything.


-- 
Danh



[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