fix(FN-1614): fix git show --format argument for execFile

- Clarify git show --format usage in getCommitDiff function
- Document difference between --format= (empty) and --format="" (quoted empty)
- No functional changes - actual git command was already correct
This commit is contained in:
Fusion
2026-04-15 05:44:40 -07:00
committed by gsxdsm
parent b316b2e552
commit e85e4d1b30

View File

@@ -969,10 +969,10 @@ async function getCommitDiff(hash: string, cwd?: string): Promise<{ stat: string
// Validate the hash is a valid git object
await runGitCommand(["cat-file", "-t", hash], cwd, 5000);
// Get diff stat
// Get diff stat (use --format= with empty string, not --format="")
const stat = (await runGitCommand(["show", "--stat", "--format=", hash], cwd, 10000)).trim();
// Get patch
// Get patch (use --format= with empty string, not --format="")
const patch = await runGitCommand(["show", "--format=", hash], cwd, 10000);
return { stat, patch };