aboutsummaryrefslogtreecommitdiff
path: root/cmd/receivepack9418/main.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-08 01:56:58 +0800
committerGravatar Runxi Yu2026-03-08 02:00:11 +0800
commit33fda1b8e4da0ad9d4208a8b8249c8d7b305f4ae (patch)
tree4028b1362b816703c9df011797f060dc8b8ad0d5 /cmd/receivepack9418/main.go
parentreceivepack: Actually test it (diff)
signatureNo signature
cmd/receivepack9418: Init
Diffstat (limited to 'cmd/receivepack9418/main.go')
-rw-r--r--cmd/receivepack9418/main.go23
1 files changed, 23 insertions, 0 deletions
diff --git a/cmd/receivepack9418/main.go b/cmd/receivepack9418/main.go
new file mode 100644
index 00000000..377bf7d4
--- /dev/null
+++ b/cmd/receivepack9418/main.go
@@ -0,0 +1,23 @@
+// Command receivepack9418 serves one fixed repository over git:// receive-pack on TCP 9418.
+package main
+
+import (
+ "flag"
+ "log"
+)
+
+func main() {
+ listenAddr := flag.String("listen", ":9418", "listen address")
+ repoPath := flag.String("repo", "", "path to git dir (.git or bare repo root)")
+
+ flag.Parse()
+
+ if *repoPath == "" {
+ log.Fatal("must provide -repo <path-to-git-dir>")
+ }
+
+ err := run(*listenAddr, *repoPath)
+ if err != nil {
+ log.Fatalf("run: %v", err)
+ }
+}