Re: [PATCH] t4013: add expected failure for "log --patch --no-patch"
- From
Sergey Organov <sorganov@gmail.com>
- Date
- May 3, 2023, 17:31 UTC
- Message-ID
- <874jote2zl.fsf@osv.gnss.ru>
- In-Reply-To
- <xmqqsfcdtkt0.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 16 quoted lines
> Sergey Organov <sorganov@gmail.com> writes: > >> --patch followed by --no-patch is to be a no-op according to the "git >> log" manual page. > > I briefly wondered if it is a bug in the documentation. But it is > clear (at least to me) that "git log -p --stat --no-patch" wants to > show only "--stat", and when "git log -p --raw" shows both patch and > raw, I do not think of a reason why "git log -p --raw --no-patch" > should not behave similarly. > >> Add a test_expected_failure case for the issue. > > That is unsatisfactory, though. Can you back-burner it and send in > a fix with the same test flipping expect_failure to expect_success > instead?
No problem from my side, but are you sure?
- test_expect_failure [<prereq>] <message> <script>
This is NOT the opposite of test_expect_success, but is used to mark a test that demonstrates a known breakage.
Don't we need exactly this in this particular case? Demonstrate a known breakage?
I'm confused.
Show 31 quoted lines
> > Thanks. > >> >> Signed-off-by: Sergey Organov <sorganov@gmail.com> >> --- >> t/t4013-diff-various.sh | 11 +++++++++++ >> 1 file changed, 11 insertions(+) >> >> diff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh >> index 5de1d190759f..f876b0cc8ec3 100755 >> --- a/t/t4013-diff-various.sh >> +++ b/t/t4013-diff-various.sh >> @@ -457,6 +457,17 @@ diff-tree --stat --compact-summary initial mode >> diff-tree -R --stat --compact-summary initial mode >> EOF >> >> +# This should succeed as --patch followed by --no-patch sequence is to >> +# be a no-op according to the manual page. In reality it breaks --raw >> +# though. Needs to be fixed. >> +test_expect_failure '--no-patch cancels --patch only' ' >> + git log --raw master >result && >> + process_diffs result >expected && >> + git log --patch --no-patch --raw >result && >> + process_diffs result >actual && >> + test_cmp expected actual >> +' >> + >> test_expect_success 'log -m matches pure log' ' >> git log master >result && >> process_diffs result >expected &&
Thanks, -- Sergey Organov