diff-so-fancy
diff-so-fancy copied to clipboard
git dependency
When I use diff-so-fancy in an environment where git is not installed I see:
# diff-so-fancy --help
Can't exec "git": No such file or directory at /usr/pkg/bin/diff-so-fancy line 451.
Can't exec "git": No such file or directory at /usr/pkg/bin/diff-so-fancy line 451.
Can't exec "git": No such file or directory at /usr/pkg/bin/diff-so-fancy line 451.
Can't exec "git": No such file or directory at /usr/pkg/bin/diff-so-fancy line 451.
Can't exec "git": No such file or directory at /usr/pkg/bin/diff-so-fancy line 451.
Can't exec "git": No such file or directory at /usr/pkg/bin/diff-so-fancy line 451.
Can't exec "git": No such file or directory at /usr/pkg/bin/diff-so-fancy line 451.
Can't exec "git": No such file or directory at /usr/pkg/bin/diff-so-fancy line 451.
Can't exec "git": No such file or directory at /usr/pkg/bin/diff-so-fancy line 451.
Can't exec "git": No such file or directory at /usr/pkg/bin/diff-so-fancy line 451.
Can't exec "git": No such file or directory at /usr/pkg/bin/diff-so-fancy line 451.
Can't exec "git": No such file or directory at /usr/pkg/bin/diff-so-fancy line 451.
Can't exec "git": No such file or directory at /usr/pkg/bin/diff-so-fancy line 451.
Diff-so-fancy: https://github.com/so-fancy/diff-so-fancy
Version : 1.4.2
Usage:
git diff --color | diff-so-fancy # Use d-s-f on one diff
cat diff.txt | diff-so-fancy # Use d-s-f on a diff/patch file
diff -u one.txt two.txt | diff-so-fancy # Use d-s-f on unified diff output
diff-so-fancy --colors # View the commands to set the recommended colors
diff-so-fancy --set-defaults # Configure git-diff to use diff-so-fancy and suggested colors
diff-so-fancy --patch # Use diff-so-fancy in patch mode (interoperable with `git add --patch`)
# Configure git to use d-s-f for *all* diff operations
git config --global core.pager "diff-so-fancy | less --tabs=4 -RFX"
# Configure git to use d-s-f for `git add --patch`
git config --global interactive.diffFilter "diff-so-fancy --patch"
But diff-so-fancy is useful without git (diff(1), hg(1)), so perhaps these warnings can be at least hidden?
This is a valid issue. I hadn't really considered the use case where git is not installed at all. I will ponder this today.
@0-wiz-0 I just landed 9ffea48 which should address this. If this doesn't address your issue please open this issue back up.
Works for me, thank you!
@0-wiz-0 great news. Thanks for reporting back. I will cross this one off the list ;)