Thread (1 message) 1 message, 1 author, 2025-08-05

Re: [PATCH v2 1/2] t5516: introduce 'push ref expression with non-existent oid src'

From: Junio C Hamano <hidden>
Date: 2025-08-05 17:12:54

Patrick Steinhardt [off-list ref] writes:
On Mon, Aug 04, 2025 at 11:24:37PM -0700, Denton Liu wrote:
quoted
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.
A very good suggestion.
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.
Yup.  The style was from a decade ago when the test suite was being
developed, and is very out of style these days.

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help