aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-29 13:30:29 +0000
committerGravatar Runxi Yu2026-03-29 13:30:29 +0000
commit6cff7528ae38a286fb56978a8d8f283ef342dfcb (patch)
tree6dd40827e37badeae229cc3144f2492aabe88b0f
parentcmd/index-pack: Split files (diff)
signatureNo signature
cmd/receivepack9418: Remove the silly runMain thingy
-rw-r--r--cmd/receivepack9418/main.go12
1 files changed, 4 insertions, 8 deletions
diff --git a/cmd/receivepack9418/main.go b/cmd/receivepack9418/main.go
index 6884f326..e9dc0bb2 100644
--- a/cmd/receivepack9418/main.go
+++ b/cmd/receivepack9418/main.go
@@ -8,10 +8,6 @@ import (
)
func main() {
- os.Exit(runMain())
-}
-
-func runMain() int {
listenAddr := flag.String("listen", ":9418", "listen address")
repoPath := flag.String("repo", "", "path to git dir (.git or bare repo root)")
cpuProfilePath := flag.String("cpuprofile", "", "write CPU profile to file")
@@ -22,7 +18,7 @@ func runMain() int {
if *repoPath == "" {
log.Print("must provide -repo <path-to-git-dir>")
- return 2
+ os.Exit(2)
}
if *cpuProfilePath != "" {
@@ -30,7 +26,7 @@ func runMain() int {
if err != nil {
log.Printf("cpuprofile: %v", err)
- return 1
+ os.Exit(1)
}
defer func() {
@@ -54,8 +50,8 @@ func runMain() int {
if err != nil {
log.Printf("run: %v", err)
- return 1
+ os.Exit(1)
}
- return 0
+ os.Exit(0)
}