Skip to content

Commit 674c4c3

Browse files
committed
The triumphant return of diff-so-fancy for git add --patch
Some really cool person fixed so-fancy/diff-so-fancy#35 so we can all use our favorite git pager in patch mode. 🎉
1 parent 80efbc6 commit 674c4c3

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

config/git/configs/diff-and-merge

+14
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
[core]
2+
pager = diff-so-fancy | less --tabs=4 -RFX
3+
14
[mergetool "diffconflicts"]
25
cmd = diffconflicts nvim \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\"
36
trustExitCode = true
@@ -16,6 +19,8 @@
1619
[pager]
1720
dfi = false
1821
dfp = false
22+
diff = diff-so-fancy | less --tabs=4 -RFX
23+
show = diff-so-fancy | less --tabs=4 -RFX
1924

2025
[diff "plist"]
2126
textconv = plutil -convert xml1 -r -o -
@@ -24,3 +29,12 @@
2429
textconv=pandoc --to=markdown
2530
prompt = false
2631

32+
[interactive]
33+
diffFilter = diff-so-fancy --patch
34+
35+
[diff-so-fancy]
36+
markEmptyLines = true
37+
changeHunkIndicators = true
38+
stripLeadingSymbols = true
39+
useUnicodeRuler = true
40+
rulerWidth = 88

config/git/configs/diff-so-fancy

-9
Original file line numberDiff line numberDiff line change
@@ -1,9 +0,0 @@
1-
[pager]
2-
# diff = diff-so-fancy | less --tabs=4 -RFX +'/^(Date|added|deleted|modified):' +1g
3-
diff = diff-so-fancy | less --tabs=4 -RFX
4-
show = diff-so-fancy | less --tabs=4 -RFX
5-
[core]
6-
pager = diff-so-fancy
7-
[interactive]
8-
# diffFilter = (echo && diff-so-fancy)
9-

0 commit comments

Comments
 (0)