summaryrefslogtreecommitdiff
path: root/go/internal/handler/receive_pack.go
diff options
context:
space:
mode:
authorJacob Vosmaer <jacob@gitlab.com>2017-04-28 18:16:55 +0200
committerJacob Vosmaer <jacob@gitlab.com>2017-05-23 15:26:35 +0200
commit25a32cfa1e0b1c7e6af723053bad0f432ffd0b32 (patch)
treebc6d2958eeedb0b0c15d329ec90cc6d0d90cb919 /go/internal/handler/receive_pack.go
parent285c061ed8933c0d94a9ad027f99653039673324 (diff)
downloadgitlab-shell-25a32cfa1e0b1c7e6af723053bad0f432ffd0b32.tar.gz
Use gitaly-upload-pack and gitaly-receive-pack
Diffstat (limited to 'go/internal/handler/receive_pack.go')
-rw-r--r--go/internal/handler/receive_pack.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/go/internal/handler/receive_pack.go b/go/internal/handler/receive_pack.go
new file mode 100644
index 0000000..5e38aca
--- /dev/null
+++ b/go/internal/handler/receive_pack.go
@@ -0,0 +1,16 @@
+package handler
+
+import (
+ "fmt"
+
+ pb "gitlab.com/gitlab-org/gitaly-proto/go"
+)
+
+func ReceivePack(gitalyAddress string, request *pb.SSHReceivePackRequest) error {
+ repoPath := request.Repository.Path
+ if repoPath == "" {
+ return fmt.Errorf("empty path in repository message")
+ }
+
+ return execCommand("git-receive-pack", repoPath)
+}