From 597b831afb25303218ac60115ac86dd8879e3ce3 Mon Sep 17 00:00:00 2001 From: Matthieu Moy Date: Tue, 3 Sep 2013 17:45:14 +0200 Subject: transport-helper: add no-private-update capability Since 664059fb (transport-helper: update remote helper namespace, 2013-04-17), a 'push' operation on a remote helper updates the private ref by default. This is often a good thing, but it can also be desirable to disable this update to force the next 'pull' to re-import the pushed revisions. Allow remote-helpers to disable the automatic update by introducing a new capability. Signed-off-by: Matthieu Moy Signed-off-by: Junio C Hamano --- t/t5801-remote-helpers.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 't') diff --git a/t/t5801-remote-helpers.sh b/t/t5801-remote-helpers.sh index 8c4c5396a8..613f69a254 100755 --- a/t/t5801-remote-helpers.sh +++ b/t/t5801-remote-helpers.sh @@ -182,6 +182,17 @@ test_expect_success 'push update refs' ' ) ' +test_expect_success 'push update refs disabled by no-private-update' ' + (cd local && + echo more-update >>file && + git commit -a -m more-update && + git rev-parse --verify testgit/origin/heads/update >expect && + GIT_REMOTE_TESTGIT_NO_PRIVATE_UPDATE=t git push origin update && + git rev-parse --verify testgit/origin/heads/update >actual && + test_cmp expect actual + ) +' + test_expect_success 'push update refs failure' ' (cd local && git checkout update && -- cgit v1.2.3