MCPcopy Index your code
hub / github.com/openclaw/clawsweeper / commitDiffSummary

Function commitDiffSummary

src/commit-sweeper.ts:164–180  ·  view source on GitHub ↗
(targetDir: string, baseSha: string, sha: string)

Source from the content-addressed store, hash-verified

162}
163
164function commitDiffSummary(targetDir: string, baseSha: string, sha: string): string {
165 const stat = run("git", ["diff", "--stat", "--summary", `${baseSha}..${sha}`], {
166 cwd: targetDir,
167 });
168 const names = run("git", ["diff", "--name-status", `${baseSha}..${sha}`], { cwd: targetDir });
169 return `## Diff Summary
170
171\`\`\`
172${stat || "(no stat output)"}
173\`\`\`
174
175## Changed Files
176
177\`\`\`
178${names || "(no changed files)"}
179\`\`\``;
180}
181
182function promptForCommit(options: {
183 targetDir: string;

Callers 1

promptForCommitFunction · 0.85

Calls 1

runFunction · 0.70

Tested by

no test coverage detected