Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <psteinhardt@gitlab.com>2020-08-07 10:16:39 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2020-08-07 10:28:17 +0300
commit19e2caa3a8a9fe390b568dd8d2b2a565be6094a7 (patch)
treef85f0042287cb897425e079c93081725e763892f
parentd6ded95a76876ff182d37cb33ed9515ed29d5c23 (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.yml5
-rw-r--r--internal/service/smarthttp/receive_pack_test.go4
l---------ruby/git-hooks/reference-transaction1
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