We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
git diff
1 parent ac35e70 commit f5e34bbCopy full SHA for f5e34bb
apply-format
@@ -302,7 +302,11 @@ else # Diff-only.
302
readonly patch_dest=/dev/stdout
303
fi
304
305
- declare git_args=(git diff -U0 --no-color)
+ # To support git when it is configured to use a non-default prefix, use
306
+ # --src-prefix and --dst-prefix to set the default prefixes explicitly. We
307
+ # don't use the newer --default-prefix option because we want to support git
308
+ # versions older than 2.41.
309
+ declare git_args=(git diff -U0 --no-color --src-prefix=a/ --dst-prefix=b/)
310
[ "$staged" = true ] && git_args+=("--staged")
311
312
# $format_diff may contain a command ("python") and the script to excute, so we
0 commit comments