Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH 2/3] t/t5400-send-pack.sh: add test_when_finished commands

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:50:26

Ævar Arnfjörð Bjarmason [off-list ref] writes:
quoted hunk
diff --git a/t/t5400-send-pack.sh b/t/t5400-send-pack.sh
index 656ab1a..0357610 100755
--- a/t/t5400-send-pack.sh
+++ b/t/t5400-send-pack.sh
@@ -90,7 +90,8 @@ test_expect_success 'refuse deleting push with denyDeletes' '
 	    git config receive.denyDeletes true &&
 	    git branch extra master
 	) &&
-	test_must_fail git send-pack ./victim :extra master
+	test_must_fail git send-pack ./victim :extra master &&
+	test_when_finished "(cd victim && git config --unset receive.denyDeletes)"
 '
I agree that you are trying to do a good thing, but does this
implementation work in practice?  If somebody breaks send-pack in such a
way that this push succeeds, doesn't the &&-chain will prevent your
"when-finished" hook to be registered to begin with?  IOW, wouldn't you
want to have when-finished as _early_ as possible, before any test that
might fail to help us identify a new breakage?

The same comment applies to other two hunks in the patch.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help