diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2020-08-07 10:16:39 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2020-08-07 10:28:17 +0300 |
commit | 19e2caa3a8a9fe390b568dd8d2b2a565be6094a7 (patch) | |
tree | f85f0042287cb897425e079c93081725e763892f | |
parent | d6ded95a76876ff182d37cb33ed9515ed29d5c23 (diff) |
git-hooks: Remove reference-transaction hook
There's a bug in the reference-transaction implementation in git-core
which will cause interleaving calls to the reference-transaction hook to
execute another hook by accident. While a fix has been proposed
upstream, the earliest it may be available is with Git v2.28.1. So let's
remove our reference-transaction hook for now to not expose this broken
behaviour.
-rw-r--r-- | changelogs/unreleased/pks-reference-transactions.yml | 5 | ||||
-rw-r--r-- | internal/service/smarthttp/receive_pack_test.go | 4 | ||||
l--------- | ruby/git-hooks/reference-transaction | 1 |
3 files changed, 4 insertions, 6 deletions
diff --git a/changelogs/unreleased/pks-reference-transactions.yml b/changelogs/unreleased/pks-reference-transactions.yml deleted file mode 100644 index a7554f797..000000000 --- a/changelogs/unreleased/pks-reference-transactions.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Transactional voting via reference-transaction hook -merge_request: 2388 -author: -type: added diff --git a/internal/service/smarthttp/receive_pack_test.go b/internal/service/smarthttp/receive_pack_test.go index a2bb352a3..eeec6e91a 100644 --- a/internal/service/smarthttp/receive_pack_test.go +++ b/internal/service/smarthttp/receive_pack_test.go @@ -608,6 +608,10 @@ func TestPostReceiveWithReferenceTransactionHook(t *testing.T) { for _, features := range featureSets { t.Run("disabled "+features.String(), func(t *testing.T) { + if !features.IsDisabled(featureflag.ReferenceTransactionHook) { + t.Skip("reference-transaction hook is broken in git-core") + } + refTransactionServer.called = 0 client, conn := newSmartHTTPClient(t, "unix://"+gitalySocketPath) diff --git a/ruby/git-hooks/reference-transaction b/ruby/git-hooks/reference-transaction deleted file mode 120000 index 3c6ac8d8c..000000000 --- a/ruby/git-hooks/reference-transaction +++ /dev/null @@ -1 +0,0 @@ -gitlab-shell-hook
\ No newline at end of file |