Documentation
¶
Overview ¶
Package gitutil wraps the git CLI operations needed by commit-spark.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type StagedDiff ¶
StagedDiff is the result of GetStagedDiff.
func GetStagedDiff ¶
func GetStagedDiff(ctx context.Context, excludeFiles []string) (*StagedDiff, error)
GetStagedDiff runs `git diff --cached --diff-algorithm=minimal`, applying the same lock-file auto-exclusion logic as the original TypeScript implementation: if any staged file is NOT a lock file, lock files (package-lock.json, pnpm-lock.yaml, *.lock) are excluded from the diff; if ALL staged files are lock files, they are kept. Returns (nil, nil) if there's nothing staged after exclusion.
Click to show internal directories.
Click to hide internal directories.