Git Diff Errors
Git diff mode depends on local Git state. If PastePrompt cannot compute a diff, check the repository first.
Checklist
- Confirm the selected folder is a Git repository.
- Run
git statuslocally. - Confirm the base ref exists.
- Confirm the head ref exists.
- Fetch missing refs if needed.
- Avoid shallow clone limitations by fetching enough history.
- Commit or intentionally include local changes.
- Retry diff mode.
Base and head ref problems
Git diff mode needs both sides of the comparison to exist locally.
Use local Git to confirm:
git rev-parse --verify main
git rev-parse --verify HEAD
git diff --stat main...HEAD
For sponsor fixes, use the same refs in PastePrompt that you use in your review notes, for example:
audit-base...sponsor-fix
If a ref only exists on a remote, fetch it first:
git fetch origin main sponsor-fix
Common causes
- Misspelled branch or tag.
- Missing remote refs.
- Shallow clone without the base commit.
- Submodule or nested repo confusion.
- Large renames that require manual review.
Dirty working tree
If the repo has uncommitted changes, decide whether they are part of the review:
- Include them only when the review is about local changes.
- Exclude or stash them when reviewing a clean branch comparison.
- Record the dirty state in your notes if it affects reproducibility.
Huge diffs
Large diffs can exceed token budgets or make LLM review noisy.
- Start with diff-only mode.
- Add full changed files for the areas under review.
- Split unrelated modules into separate bundles.
- Exclude generated files, build outputs, and vendored files unless they are directly relevant.
Renamed and deleted files
Git rename detection is heuristic. A large rewrite may appear as a delete plus add. Review deleted files carefully because removed checks, tests, or config can matter as much as added code.
Safe support report
Include the base ref, head ref, git status summary, whether the repo is shallow, and the sanitized error text. Do not send source diffs or client-confidential patch content unless support explicitly requests a secure channel.