This commit is contained in:
2026-06-22 08:55:57 +08:00
parent dbb87823e8
commit 6ade6e8fa9
325 changed files with 41131 additions and 855 deletions
+7
View File
@@ -34,6 +34,13 @@ type Runner interface {
ListRemoteBranches(ctx context.Context, dir string, cred *Credential) ([]string, error)
Checkout(ctx context.Context, dir, branch string) error
Log(ctx context.Context, dir string, n int) ([]Commit, error)
Diff(ctx context.Context, dir string, opts DiffOptions) (DiffResult, error)
// ListTrackedFiles returns the git-tracked files at HEAD (git ls-files),
// worktree-relative, so the indexer never walks ignored/vendored/untracked paths.
ListTrackedFiles(ctx context.Context, dir string) ([]string, error)
// DiffStat returns the `--stat` summary for a single commit (git show --stat),
// used by auto-doc generation to feed the LLM a bounded change overview.
DiffStat(ctx context.Context, dir, commitSHA string) (string, error)
}
// FileStatus 表示 `git status --porcelain=v1` 的一行。