grasp: remove apparently useless usage of syscall.SysProcAttr as it breaks windows builds.
This commit is contained in:
@@ -8,7 +8,6 @@ import (
|
||||
"os"
|
||||
"os/exec"
|
||||
"strings"
|
||||
"syscall"
|
||||
|
||||
"fiatjaf.com/nostr"
|
||||
)
|
||||
@@ -61,7 +60,6 @@ func (gs *GraspServer) handleInfoRefs(
|
||||
// runInfoRefs executes git-upload-pack with --http-backend-info-refs
|
||||
func (gs *GraspServer) runInfoRefs(w http.ResponseWriter, r *http.Request, serviceName, repoPath string) error {
|
||||
cmd := exec.Command(serviceName, "--stateless-rpc", "--http-backend-info-refs", ".")
|
||||
cmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}
|
||||
cmd.Dir = repoPath
|
||||
cmd.Env = append(os.Environ(), fmt.Sprintf("GIT_PROTOCOL=%s", r.Header.Get("Git-Protocol")))
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@ import (
|
||||
"net/http"
|
||||
"os"
|
||||
"os/exec"
|
||||
"syscall"
|
||||
|
||||
"fiatjaf.com/nostr"
|
||||
)
|
||||
@@ -77,7 +76,6 @@ func (gs *GraspServer) handleGitUploadPack(
|
||||
// runUploadPack executes git-upload-pack for pull operations
|
||||
func (gs *GraspServer) runUploadPack(w http.ResponseWriter, r *http.Request, repoPath string, bodyReader io.ReadCloser) error {
|
||||
cmd := exec.Command("git", "upload-pack", "--stateless-rpc", ".")
|
||||
cmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}
|
||||
cmd.Dir = repoPath
|
||||
cmd.Env = append(os.Environ(), fmt.Sprintf("GIT_PROTOCOL=%s", r.Header.Get("Git-Protocol")))
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ import (
|
||||
"os/exec"
|
||||
"strings"
|
||||
"sync"
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"fiatjaf.com/nostr"
|
||||
@@ -112,7 +111,6 @@ func (gs *GraspServer) handleGitReceivePack(
|
||||
// runReceivePack executes git-receive-pack for push operations
|
||||
func (gs *GraspServer) runReceivePack(w http.ResponseWriter, r *http.Request, repoPath string, bodyReader io.ReadCloser) error {
|
||||
cmd := exec.Command("git", "receive-pack", "--stateless-rpc", ".")
|
||||
cmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}
|
||||
cmd.Dir = repoPath
|
||||
cmd.Env = append(os.Environ(), fmt.Sprintf("GIT_PROTOCOL=%s", r.Header.Get("Git-Protocol")))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user