summaryrefslogtreecommitdiff
path: root/go/internal/handler/upload_pack.go
diff options
context:
space:
mode:
Diffstat (limited to 'go/internal/handler/upload_pack.go')
-rw-r--r--go/internal/handler/upload_pack.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/go/internal/handler/upload_pack.go b/go/internal/handler/upload_pack.go
new file mode 100644
index 0000000..0312972
--- /dev/null
+++ b/go/internal/handler/upload_pack.go
@@ -0,0 +1,16 @@
+package handler
+
+import (
+ "fmt"
+
+ pb "gitlab.com/gitlab-org/gitaly-proto/go"
+)
+
+func UploadPack(gitalyAddress string, request *pb.SSHUploadPackRequest) error {
+ repoPath := request.Repository.Path
+ if repoPath == "" {
+ return fmt.Errorf("empty path in repository message")
+ }
+
+ return execCommand("git-upload-pack", repoPath)
+}