diff

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2026 License: MIT Imports: 3 Imported by: 0

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL