Documentation
¶
Index ¶
- func EnumerateTree(ctx context.Context, r *gitutil.Runner, repoDir, commit string) (map[string]PathMeta, error)
- func FilterNonIgnoredPaths(ctx context.Context, r *gitutil.Runner, templateDir string, ...) ([]string, error)
- func FindBaselineRootCommit(ctx context.Context, r *gitutil.Runner, activeDir string) (string, error)
- func Run(ctx context.Context, opts RunOptions) error
- type DefaultBranch
- type Feedback
- type PatchRepoResult
- type PathMeta
- type RunOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnumerateTree ¶
func EnumerateTree(ctx context.Context, r *gitutil.Runner, repoDir, commit string) (map[string]PathMeta, error)
EnumerateTree returns all file paths tracked at the given commit, along with object metadata. Returned paths are repo-relative and match the output of `git ls-tree -r --name-only`.
func FilterNonIgnoredPaths ¶
func FilterNonIgnoredPaths(ctx context.Context, r *gitutil.Runner, templateDir string, candidatePaths []string) ([]string, error)
FilterNonIgnoredPaths returns only the paths that are NOT ignored by the template repo's ignore rules as of the template repo's current state (i.e. patterns from .gitignore at HEAD).
func FindBaselineRootCommit ¶
Types ¶
type DefaultBranch ¶
type DefaultBranch struct {
Ref string // e.g. refs/remotes/origin/main or refs/heads/main or HEAD
Commit string
Display string // short display name for audit
}
func FindDefaultBranchTip ¶
type PatchRepoResult ¶
type PatchRepoResult struct {
PatchRepoDir string
BaselineOID string
TemplateOID string
PatchPath string
}
func CreatePatchRepoAndGeneratePatch ¶
func CreatePatchRepoAndGeneratePatch( ctx context.Context, r *gitutil.Runner, feedback Feedback, workdirParent string, keepWorkdir bool, activeDir string, templateDir string, baselineCommit string, templateLatestCommit string, includedPaths []string, baselineEntries map[string]PathMeta, templateEntries map[string]PathMeta, audit *gitutil.AuditLogger, ) (*PatchRepoResult, error)
Click to show internal directories.
Click to hide internal directories.