git: use difftastic
by default
As described in https://difftastic.wilfred.me.uk/git.html#difftastic-by-default, the `--ext-diff` option needs to be used for difftastic to be used on commands other than `git diff`, such as `git show` or `git log`. > This only applies to git diff. For other git commands, you still need to specify --ext-diff, or use an alias as described above. ```shell $ git diff $ git show HEAD --ext-diff $ git log -p --ext-diff ``` > Conversely, if you need to copy/paste a diff in the standard diff format, you can use git diff --no-ext-diff.
This commit is contained in:
parent
c06fb20115
commit
2fbf67507f
|
@ -20,6 +20,11 @@
|
||||||
else
|
else
|
||||||
(cd "''${ROOT}" && eval "''${@}")
|
(cd "''${ROOT}" && eval "''${@}")
|
||||||
fi
|
fi
|
||||||
|
elif [[ "''$1" == "log" || "''$1" == "show" ]]; then
|
||||||
|
local command="$1"
|
||||||
|
shift 1
|
||||||
|
|
||||||
|
${pkgs.git}/bin/git "$command" --ext-diff "$@"
|
||||||
else
|
else
|
||||||
${pkgs.git}/bin/git "''${@}"
|
${pkgs.git}/bin/git "''${@}"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue