Describe the bug
Piping a diff into difi renders an empty file tree when git is configured with diff.mnemonicPrefix=true (and presumably diff.noprefix=true). ParseFilesFromDiff and ExtractFileDiff in internal/git/client.go only match headers starting literally with diff --git a/, but mnemonicPrefix produces e.g. diff --git c/package-lock.json w/package-lock.json, so no files are ever matched. Workaround: git diff --default-prefix | difi.
To Reproduce
Steps to reproduce the behavior:
git config diff.mnemonicPrefix true
- Run
git diff HEAD~1 | difi in a repo where that diff is non-empty
- difi opens with an empty file tree and no diff content
Expected behavior
Piped diffs render regardless of git prefix configuration, or difi documents the limitation.
Environment (please complete the following information):
- OS: macOS (Apple Silicon, latest)
- Terminal Emulator: Ghostty
- Difi Version: v0.2.1 (parsing code unchanged on main)
Screenshots
N/A
Additional context
A generic header match would fix it, e.g. treating any diff --git <p>/<path> <p>/<path> prefix pair (or no prefix) as valid.
Describe the bug
Piping a diff into difi renders an empty file tree when git is configured with
diff.mnemonicPrefix=true(and presumablydiff.noprefix=true).ParseFilesFromDiffandExtractFileDiffininternal/git/client.goonly match headers starting literally withdiff --git a/, but mnemonicPrefix produces e.g.diff --git c/package-lock.json w/package-lock.json, so no files are ever matched. Workaround:git diff --default-prefix | difi.To Reproduce
Steps to reproduce the behavior:
git config diff.mnemonicPrefix truegit diff HEAD~1 | difiin a repo where that diff is non-emptyExpected behavior
Piped diffs render regardless of git prefix configuration, or difi documents the limitation.
Environment (please complete the following information):
Screenshots
N/A
Additional context
A generic header match would fix it, e.g. treating any
diff --git <p>/<path> <p>/<path>prefix pair (or no prefix) as valid.