Re: [PATCH v2 1/2] t5516: introduce 'push ref expression with non-existent oid src'
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Aug 5, 2025, 13:28 UTC
- Message-ID
- <aJIG4lZURgqvSup1@pks.im>
- In-Reply-To
- <d26f355c19c59eae30143900e218533bfeabec2a.1754375026.git.liu.denton@gmail.com>
On Mon, Aug 04, 2025 at 11:24:37PM -0700, Denton Liu wrote:
Show 17 quoted lines
> diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh > index 4e9c27b0f2..c2fcfeca92 100755 > --- a/t/t5516-fetch-push.sh > +++ b/t/t5516-fetch-push.sh > @@ -509,6 +509,13 @@ test_expect_success 'push ref expression with non-existent, incomplete dest' ' > > ' > > +test_expect_failure 'push ref expression with non-existent oid src' ' > + > + mk_test testrepo && > + test_must_fail git push testrepo $(test_oid 001):branch > + > +' > + > for head in HEAD @ > do
Nit: I don't think it's necessary to implement the test in a separate commit. Folks who want to check that your fix really does something can trivially revert the code changes while retaining the test. I used to do the same in the past, but received the same feedback.
Also, I think we can drop the empty surrounding lines in the test body. Other tests in this file do the same, but that is not a good reason to not do better for newly added tests.
Patrick