Re: [PATCH v3 4/5] rebase -i: support --ignore-date
- From
Đoàn Trần Công Danh <congdanhqx@gmail.com>
- Date
- May 23, 2020, 12:30 UTC
- Message-ID
- <20200523123025.GA20683@danh.dev>
- In-Reply-To
- <20200521101455.63484-5-phillip.wood123@gmail.com>
Hi Phillip,
On 2020-05-21 11:14:54+0100, Phillip Wood <phillip.wood123@gmail.com> wrote:
Show 7 quoted lines
> +# 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.
Show 19 quoted lines
> + 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