diff options
author | Runxi Yu <me@runxiyu.org> | 2025-04-05 20:26:57 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-04-05 20:26:57 +0800 |
commit | 20b4fe0c59357a433042732d46e38da9c3d14c3b (patch) | |
tree | 537d7d450701a839802b1d57a82bd07324dcba90 /lmtp_handle_patch.go | |
parent | misc: Move utils.go's string function to misc (diff) | |
download | forge-20b4fe0c59357a433042732d46e38da9c3d14c3b.tar.gz forge-20b4fe0c59357a433042732d46e38da9c3d14c3b.tar.zst forge-20b4fe0c59357a433042732d46e38da9c3d14c3b.zip |
database shall no longer be a global variable
Diffstat (limited to 'lmtp_handle_patch.go')
-rw-r--r-- | lmtp_handle_patch.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lmtp_handle_patch.go b/lmtp_handle_patch.go index 45d146a..ab846aa 100644 --- a/lmtp_handle_patch.go +++ b/lmtp_handle_patch.go @@ -19,7 +19,7 @@ import ( "go.lindenii.runxiyu.org/forge/misc" ) -func lmtpHandlePatch(session *lmtpSession, groupPath []string, repoName string, mbox io.Reader) (err error) { +func (s *server) lmtpHandlePatch(session *lmtpSession, groupPath []string, repoName string, mbox io.Reader) (err error) { var diffFiles []*gitdiff.File var preamble string if diffFiles, preamble, err = gitdiff.Parse(mbox); err != nil { @@ -33,7 +33,7 @@ func lmtpHandlePatch(session *lmtpSession, groupPath []string, repoName string, var repo *git.Repository var fsPath string - repo, _, _, fsPath, err = openRepo(session.ctx, groupPath, repoName) + repo, _, _, fsPath, err = s.openRepo(session.ctx, groupPath, repoName) if err != nil { return fmt.Errorf("failed to open repo: %w", err) } |