Documentation
¶
Index ¶
Constants ¶
View Source
const ( OriginMain = "origin/main" LocalMain = "main" )
Variables ¶
View Source
var ( ErrNotAGitRepo = fmt.Errorf("not a git repository: ensure you are in a git repository or provide a valid file path") ErrNoParentBranch = fmt.Errorf("no parent branch found: are you on the main branch for this repository?") )
View Source
var DefaultOptions = Options{}
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
TargetRef string // Target ref for git diff, e.g., "origin/main" or commit hash.
}
type Results ¶
func NewResults ¶
func Run ¶
Run executes the 'git diff' command with the provided options and parses its output into a Results struct. If opts is nil, it uses DefaultOptions.
Click to show internal directories.
Click to hide internal directories.