MCPcopy Create free account
hub / github.com/alibaba/open-code-review / NewCommitProvider

Function NewCommitProvider

internal/diff/git.go:72–79  ·  view source on GitHub ↗

NewCommitProvider creates a Provider for commit mode: show changes introduced by a single commit.

(repoDir, commit string, runner *gitcmd.Runner)

Source from the content-addressed store, hash-verified

70
71// NewCommitProvider creates a Provider for commit mode: show changes introduced by a single commit.
72func NewCommitProvider(repoDir, commit string, runner *gitcmd.Runner) *Provider {
73 return &Provider{
74 repoDir: repoDir,
75 mode: ModeCommit,
76 commit: commit,
77 runner: runner,
78 }
79}
80
81// NewWorkspaceProvider creates a Provider for workspace mode (current uncommitted changes).
82func NewWorkspaceProvider(repoDir string, runner *gitcmd.Runner) *Provider {

Calls

no outgoing calls