Affected Version
paru v2.1.0 - libalpm v16.0.1
Description
Paru uses git diff to produce .diff files for AUR packages that are being updated. In my eyes .diff files a expected (by me and by my editor for highlighting) to use the regular diff syntax, not whatever my external diff tool provides. Even if I wanted to use my external diff tool, I would need colors, because it's unreadable without them, but paru disables colors with --color=never. I think the most sensible solution here is to simply always pass the --no-ext-diff flag to git diff.
I tried fixing this on my end, but as far as I can tell, the only way to disable it is using the --no-ext-diff flag passed to git diff (not git!), which paru doesn't let me do. Git has no flags or environment variables for unsetting options (I can only set diff.external to an empty string, which will make git diff error). The only way then to fix this is on my end is by creating a git wrapper script for paru that checks if the subcommand used is diff, and if so appends the --no-ext-diff flag, but this is a massive hack. So if for some reason, --no-ext-diff shouldn't always be passed (in my opinion, it should, as I explained previously), a GitDiffFlags option could be added to paru to let users pass it.
Affected Version
paru v2.1.0 - libalpm v16.0.1Description
Paru uses
git diffto produce.difffiles for AUR packages that are being updated. In my eyes.difffiles a expected (by me and by my editor for highlighting) to use the regular diff syntax, not whatever my external diff tool provides. Even if I wanted to use my external diff tool, I would need colors, because it's unreadable without them, but paru disables colors with--color=never. I think the most sensible solution here is to simply always pass the--no-ext-diffflag togit diff.I tried fixing this on my end, but as far as I can tell, the only way to disable it is using the
--no-ext-diffflag passed togit diff(notgit!), which paru doesn't let me do. Git has no flags or environment variables for unsetting options (I can only setdiff.externalto an empty string, which will makegit differror). The only way then to fix this is on my end is by creating a git wrapper script for paru that checks if the subcommand used isdiff, and if so appends the--no-ext-diffflag, but this is a massive hack. So if for some reason,--no-ext-diffshouldn't always be passed (in my opinion, it should, as I explained previously), aGitDiffFlagsoption could be added to paru to let users pass it.