Documentation
¶
Overview ¶
Package gitops provides Git operations interface and implementations.
This code is adapted from git-mcp-go by Gero Posmyk-Leinemann and contributors. Original source: https://github.com/geropl/git-mcp-go Copyright (c) Gero Posmyk-Leinemann <[email protected]>
Package gitops provides Git operations interface and implementations.
This code is adapted from git-mcp-go by Gero Posmyk-Leinemann and contributors. Original source: https://github.com/geropl/git-mcp-go Copyright (c) Gero Posmyk-Leinemann <[email protected]>
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GitOperations ¶
type GitOperations interface {
GetStatus(repoPath string) (string, error)
GetDiffUnstaged(repoPath string) (string, error)
GetDiffStaged(repoPath string) (string, error)
GetDiff(repoPath string, target string) (string, error)
CommitChanges(repoPath string, message string) (string, error)
AddFiles(repoPath string, files []string) (string, error)
ResetStaged(repoPath string) (string, error)
GetLog(repoPath string, maxCount int) ([]string, error)
CreateBranch(repoPath string, branchName string, baseBranch string) (string, error)
CheckoutBranch(repoPath string, branchName string) (string, error)
InitRepo(repoPath string) (string, error)
ShowCommit(repoPath string, revision string) (string, error)
PushChanges(repoPath string, remote string, branch string) (string, error)
PullChanges(repoPath string, remote string, branch string) (string, error)
ApplyPatchFromString(repoPath string, patchString string) (string, error)
ApplyPatchFromFile(repoPath string, patchFilePath string) (string, error)
// Worktree operations
ListWorktrees(repoPath string) (string, error)
AddWorktree(repoPath string, worktreePath string, commitish string, options []string) (string, error)
RemoveWorktree(repoPath string, worktreeName string, force bool) (string, error)
LockWorktree(repoPath string, worktreeName string, reason string) (string, error)
UnlockWorktree(repoPath string, worktreeName string) (string, error)
PruneWorktrees(repoPath string, dryRun bool, verbose bool) (string, error)
}
GitOperations defines the interface for Git operations
Click to show internal directories.
Click to hide internal directories.