File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ if ($args->{color_on}) {
53
53
$color_forced = 1;
54
54
}
55
55
56
- # `git add --patch` requries our output to match the number of lines from the
56
+ # `git add --patch` requires our output to match the number of lines from the
57
57
# input. So, when patch mode is active, we print out empty lines to pad our
58
58
# output to match any lines we've consumed.
59
59
if ($args -> {patch }) {
@@ -711,9 +711,13 @@ diff -u one.txt two.txt | diff-so-fancy # Use d-s-f on unified diff output
711
711
712
712
diff-so-fancy --colors # View the commands to set the recommended colors
713
713
diff-so-fancy --set-defaults # Configure git-diff to use diff-so-fancy and suggested colors
714
+ diff-so-fancy --patch # Use diff-so-fancy in patch mode (interoperable with `git add --patch`)
714
715
715
716
# Configure git to use d-s-f for *all* diff operations
716
- git config --global core.pager \" diff-so-fancy | less --tabs=4 -RFX\"\n " ;
717
+ git config --global core.pager \" diff-so-fancy | less --tabs=4 -RFX\"
718
+
719
+ # Configure git to use d-s-f for `git add --patch`
720
+ git config --global interactive.diffFilter \" diff-so-fancy --patch\"\n " ;
717
721
718
722
return $out ;
719
723
}
You can’t perform that action at this time.
0 commit comments