aboutsummaryrefslogtreecommitdiff
path: root/ssh_handle_receive_pack.go
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-04-05 21:47:44 +0800
committerRunxi Yu <me@runxiyu.org>2025-04-05 21:47:44 +0800
commitefa6f33b4c67f64a4a8d8cd723b9bbc9494fc735 (patch)
treec4075c78bc4126d764f91ec68931c34281913dcc /ssh_handle_receive_pack.go
parentAdd missing copyright headers (diff)
downloadforge-0.1.24.tar.gz
forge-0.1.24.tar.zst
forge-0.1.24.zip
Unexport fields in Serverv0.1.24
Diffstat (limited to 'ssh_handle_receive_pack.go')
-rw-r--r--ssh_handle_receive_pack.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/ssh_handle_receive_pack.go b/ssh_handle_receive_pack.go
index 724c3fd..de6843a 100644
--- a/ssh_handle_receive_pack.go
+++ b/ssh_handle_receive_pack.go
@@ -51,7 +51,7 @@ func (s *Server) sshHandleRecvPack(session gliderSSH.Session, pubkey, repoIdenti
}
hooksPath := repoConfCore.OptionAll("hooksPath")
- if len(hooksPath) != 1 || hooksPath[0] != s.Config.Hooks.Execs {
+ if len(hooksPath) != 1 || hooksPath[0] != s.config.Hooks.Execs {
return errors.New("repository has hooksPath set to an unexpected value")
}
@@ -91,7 +91,7 @@ func (s *Server) sshHandleRecvPack(session gliderSSH.Session, pubkey, repoIdenti
fmt.Fprintln(session.Stderr(), "Error while generating cookie:", err)
}
- s.PackPasses.Store(cookie, packPass{
+ s.packPasses.Store(cookie, packPass{
session: session,
pubkey: pubkey,
directAccess: directAccess,
@@ -104,13 +104,13 @@ func (s *Server) sshHandleRecvPack(session gliderSSH.Session, pubkey, repoIdenti
contribReq: contribReq,
userType: userType,
})
- defer s.PackPasses.Delete(cookie)
+ defer s.packPasses.Delete(cookie)
// The Delete won't execute until proc.Wait returns unless something
// horribly wrong such as a panic occurs.
proc := exec.CommandContext(session.Context(), "git-receive-pack", repoPath)
proc.Env = append(os.Environ(),
- "LINDENII_FORGE_HOOKS_SOCKET_PATH="+s.Config.Hooks.Socket,
+ "LINDENII_FORGE_HOOKS_SOCKET_PATH="+s.config.Hooks.Socket,
"LINDENII_FORGE_HOOKS_COOKIE="+cookie,
)
proc.Stdin = session