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:
authorJacob Vosmaer <jacob@gitlab.com>2019-11-01 21:27:59 +0300
committerPaul Okstad <pokstad@gitlab.com>2019-11-01 21:27:59 +0300
commit6867e5bfc38b68a7abb82d60bdd444f25ffc65ad (patch)
tree37baf8269b1382d29013598ae835f24367ad9da1 /internal/git
parent226eef60665b0929bd3db358c81018c03f45fb29 (diff)
Use Git DSL in receive-pack RPC's
Diffstat (limited to 'internal/git')
-rw-r--r--internal/git/receivepack.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/git/receivepack.go b/internal/git/receivepack.go
index f4dbdba8c..65d764573 100644
--- a/internal/git/receivepack.go
+++ b/internal/git/receivepack.go
@@ -29,15 +29,15 @@ func HookEnv(req ReceivePackRequest) []string {
// ReceivePackConfig contains config options we want to enforce when
// receiving a push with git-receive-pack.
-func ReceivePackConfig() []string {
- return []string{
- fmt.Sprintf("core.hooksPath=%s", hooks.Path()),
+func ReceivePackConfig() []Option {
+ return []Option{
+ ValueFlag{"-c", fmt.Sprintf("core.hooksPath=%s", hooks.Path())},
// In case the repository belongs to an object pool, we want to prevent
// Git from including the pool's refs in the ref advertisement. We do
// this by rigging core.alternateRefsCommand to produce no output.
// Because Git itself will append the pool repository directory, the
// command ends with a "#". The end result is that Git runs `/bin/sh -c 'exit 0 # /path/to/pool.git`.
- "core.alternateRefsCommand=exit 0 #",
+ ValueFlag{"-c", "core.alternateRefsCommand=exit 0 #"},
}
}