Re: [PATCH v3 4/5] rebase -i: support --ignore-date
- From
- Phillip Wood <phillip.wood123@gmail.com>
- Date
- May 23, 2020, 15:43 UTC
- Message-ID
- <bc6bc4d4-79cb-f788-deca-41a3735fcaae@gmail.com>
- In-Reply-To
- <20200523123025.GA20683@danh.dev>
Hi Danh
On 23/05/2020 13:30, Đoàn Trần Công Danh wrote:
Show 21 quoted lines
> Hi Phillip, > > On 2020-05-21 11:14:54+0100, Phillip Wood <phillip.wood123@gmail.com> 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.
Yes it would be better to print the newline, thanks
Show 31 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.
It's only rebasing one commit - the log command is missing -1. I've checked the log invocations in the other tests and I think they're all OK.
Junio - are you happy to fix this up (assuming there are no other issues) or do you want a re-roll?
Thanks
Phillip