Skip to content

Commit

Permalink
The triumphant return of diff-so-fancy for git add --patch
Browse files Browse the repository at this point in the history
Some really cool person fixed so-fancy/diff-so-fancy#35 so we can all
use our favorite git pager in patch mode. 🎉
  • Loading branch information
wren committed Jan 3, 2021
1 parent 80efbc6 commit 674c4c3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
14 changes: 14 additions & 0 deletions config/git/configs/diff-and-merge
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[core]
pager = diff-so-fancy | less --tabs=4 -RFX

[mergetool "diffconflicts"]
cmd = diffconflicts nvim \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\"
trustExitCode = true
Expand All @@ -16,6 +19,8 @@
[pager]
dfi = false
dfp = false
diff = diff-so-fancy | less --tabs=4 -RFX
show = diff-so-fancy | less --tabs=4 -RFX

[diff "plist"]
textconv = plutil -convert xml1 -r -o -
Expand All @@ -24,3 +29,12 @@
textconv=pandoc --to=markdown
prompt = false

[interactive]
diffFilter = diff-so-fancy --patch

[diff-so-fancy]
markEmptyLines = true
changeHunkIndicators = true
stripLeadingSymbols = true
useUnicodeRuler = true
rulerWidth = 88
9 changes: 0 additions & 9 deletions config/git/configs/diff-so-fancy
Original file line number Diff line number Diff line change
@@ -1,9 +0,0 @@
[pager]
# diff = diff-so-fancy | less --tabs=4 -RFX +'/^(Date|added|deleted|modified):' +1g
diff = diff-so-fancy | less --tabs=4 -RFX
show = diff-so-fancy | less --tabs=4 -RFX
[core]
pager = diff-so-fancy
[interactive]
# diffFilter = (echo && diff-so-fancy)

0 comments on commit 674c4c3

Please sign in to comment.