Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Generator ¶
type Generator interface {
// GenerateDiff produces a unified diff using merge-base strategy.
//
// Steps:
// 1. git fetch origin <sourceBranch> <destBranch>
// 2. git merge-base origin/<destBranch> origin/<sourceBranch>
// 3. git diff <merge-base> origin/<sourceBranch>
GenerateDiff(repoPath, sourceBranch, destBranch string) (string, error)
}
Generator defines the interface for producing diffs between branches.
type GitGenerator ¶
type GitGenerator struct {
// contains filtered or unexported fields
}
GitGenerator implements Generator using local Git commands. cmdLog records git commands executed (populated only in tests via enableCmdLog).
func (*GitGenerator) GenerateDiff ¶
func (g *GitGenerator) GenerateDiff(repoPath, sourceBranch, destBranch string) (string, error)
Click to show internal directories.
Click to hide internal directories.