aboutsummaryrefslogtreecommitdiff
path: root/ssh_handle_upload_pack.go
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-03-19 11:39:54 +0800
committerRunxi Yu <me@runxiyu.org>2025-03-19 12:03:39 +0800
commit90ce7b1faf976d76329a8c02008cd84c78a753f5 (patch)
tree9374618661e2521fec73ab9fc6f1f0f8f68f0c2b /ssh_handle_upload_pack.go
parentRemove underscores from Go code, pt 3 (diff)
downloadforge-90ce7b1faf976d76329a8c02008cd84c78a753f5.tar.gz
forge-90ce7b1faf976d76329a8c02008cd84c78a753f5.tar.zst
forge-90ce7b1faf976d76329a8c02008cd84c78a753f5.zip
Remove underscores from Go code, pt 4
Diffstat (limited to '')
-rw-r--r--ssh_handle_upload_pack.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/ssh_handle_upload_pack.go b/ssh_handle_upload_pack.go
index 0aa2f17..ab62533 100644
--- a/ssh_handle_upload_pack.go
+++ b/ssh_handle_upload_pack.go
@@ -11,15 +11,15 @@ import (
glider_ssh "github.com/gliderlabs/ssh"
)
-// ssh_handle_upload_pack handles clones/fetches. It just uses git-upload-pack
+// sshHandleUploadPack handles clones/fetches. It just uses git-upload-pack
// and has no ACL checks.
-func ssh_handle_upload_pack(session glider_ssh.Session, pubkey, repo_identifier string) (err error) {
- var repo_path string
- if _, _, _, repo_path, _, _, _, _, err = get_repo_path_perms_from_ssh_path_pubkey(session.Context(), repo_identifier, pubkey); err != nil {
+func sshHandleUploadPack(session glider_ssh.Session, pubkey, repoIdentifier string) (err error) {
+ var repoPath string
+ if _, _, _, repoPath, _, _, _, _, err = getRepoInfo2(session.Context(), repoIdentifier, pubkey); err != nil {
return err
}
- proc := exec.CommandContext(session.Context(), "git-upload-pack", repo_path)
+ proc := exec.CommandContext(session.Context(), "git-upload-pack", repoPath)
proc.Env = append(os.Environ(), "LINDENII_FORGE_HOOKS_SOCKET_PATH="+config.Hooks.Socket)
proc.Stdin = session
proc.Stdout = session