Skip to content

fix: neutralize git config that alters diff format - #31

Open
sdirix wants to merge 1 commit into
nilbuild:mainfrom
sdirix:fix/mnemonic-prefix-diff
Open

fix: neutralize git config that alters diff format#31
sdirix wants to merge 1 commit into
nilbuild:mainfrom
sdirix:fix/mnemonic-prefix-diff

Conversation

@sdirix

@sdirix sdirix commented Jul 23, 2026

Copy link
Copy Markdown

User git config such as diff.mnemonicPrefix, diff.noprefix, custom src/dst prefixes, color.ui=always, or diff.external changes the output of git diff so the parser's diff --git a/… b/… header no longer matches, resulting in an empty diff.

Force a standard, parseable format by passing --no-color, --no-ext-diff and --src-prefix=a/ --dst-prefix=b/ to all diff-producing invocations.

This is similar to #21 but covers more cases.

User git config such as diff.mnemonicPrefix, diff.noprefix, custom
src/dst prefixes, color.ui=always, or diff.external changes the output
of `git diff` so the parser's `diff --git a/… b/…` header no longer
matches, resulting in an empty diff.

Force a standard, parseable format by passing --no-color, --no-ext-diff
and --src-prefix=a/ --dst-prefix=b/ to all diff-producing invocations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant