Skip to content

Commit

Permalink
git: replace diff-so-fancy with delta
Browse files Browse the repository at this point in the history
diff-so-fancy does not work on `git add -p`, but delta does.

There had been a long discussion on the --patch issue in
diff-so-fancy[0] and the problems there, happen during git add, too.

Some commits [1] are referencing this issue. Here it got replaced with
delta.

After some checks, it seems to work fine and much better than
diff-so-fancy.

[0] so-fancy/diff-so-fancy#35
[1] arcticicestudio/igloo@4815419
  • Loading branch information
bebehei committed Apr 21, 2023
1 parent 1e0b12f commit 2382d33
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
path = zsh/oh-my-zsh
url = https://github.com/robbyrussell/oh-my-zsh
branch = master
[submodule "git/diff-so-fancy"]
path = git/diff-so-fancy
url = https://github.com/stevemao/diff-so-fancy.git
[submodule "zsh/zsh-syntax-highlighting"]
path = zsh/zsh-syntax-highlighting
url = https://github.com/zsh-users/zsh-syntax-highlighting
Expand Down
1 change: 0 additions & 1 deletion git/diff-so-fancy
Submodule diff-so-fancy deleted from 19e55f
9 changes: 8 additions & 1 deletion git/gitconfig
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
[core]
editor = vim
eol = native
pager = diff-so-fancy | less --tabs=4 -RFX
pager = delta
[alias]
ct = log --graph --decorate --pretty=oneline --abbrev-commit
committree = log --graph --decorate --pretty=oneline --abbrev-commit
Expand All @@ -36,8 +36,15 @@
fetch = +refs/merge-requests/*/head:refs/remotes/origin/merge-requests/*
[diff]
tool = vimdiff
colorMoved = default
[difftool]
prompt = false
[interactive]
diffFilter = delta --color-only
[delta]
navigate = true
light = false
line-numbers = true
[color "diff-highlight"]
oldNormal = red
oldHighlight = red bold 52
Expand Down

0 comments on commit 2382d33

Please sign in to comment.