Command `run` should allow external `diff` drivers on `--show-diff-on-failure`
See original GitHub issueCurrently, pre-commit
doesn’t allow external diff drivers to be used when --show-diff-on-failure
. This is a convenient feature to have since default diff drivers are not so human readable, especially on trailing whitespace changes.
With default driver:
With a custom (diff-so-fancy
) driver specified in the .gitconfig
of the user:
In practice, --no-ext-diff
shouldn’t be enforced. See https://github.com/pre-commit/pre-commit/blob/main/pre_commit/commands/run.py#L306 .
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Solved: external diff stopped working - Atlassian Community
gitconfig file updated. I've manually added diff tools to it and it works from command line. [difftool "sourcetree"] cmd = 'C:\\Program ...
Read more >Using custom diff tool with `git show` - Stack Overflow
We need to modify our gitattributes to use our custom driver. The gitattributes file consist of a syntax similar to filename value [value2...
Read more >Allow disabling external diff drivers everywhere #2069 - GitHub
Hi! When I use git on a command line, I have configured external diff (namely patdiff). Unfortunately, I cannot configure its output to...
Read more >Release Notes — Airflow Documentation
This allows DAG runs to be automatically created as a result of a task “producing” a dataset. In some ways this can be...
Read more >diff-config Documentation - Git
Instead, silently run git update-index --refresh to update the cached stat ... The defaults can be overridden on the command line (using ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
there’s no pipe there
I’m not changing it, stop arguing you are wasting your time and my time
Piping the output is an option, but if we consider that hooks could output a unified diff format in the middle of the output, this is not ideal.
External drivers can even open UI tools, but that’s the user option to do so. What about just allowing custom pagers then? In contrast to external diff drivers, pagers are intended to output on the TTY and check for TTY interactiveness.