jonas / tig

Text-mode interface for git
https://jonas.github.io/tig/
GNU General Public License v2.0
12.48k stars 611 forks source link

default view does not honour diff.orderFile for Staged/Unstaged changes #1311

Open pkitszel opened 11 months ago

pkitszel commented 11 months ago

When one invokes tig with something in Staged changes or Unstaged changes, the diff.orderFile from config is not honoured.

Order is maintained when one uses tig to navigate to any recent commit (so for changes already commited), and it works well with plain git diff on the very same changes made.

tig version 2.5.5

To reproduce in empty test repo:

echo '*.h' > test-order
echo '*.c' >> test-order
git config diff.orderFile test-order
echo h > h.h
echo c > c.c
git add c.c h.h
git commit -m c1
echo x > h.h 
echo x > c.c 
git diff
tig

image image image

koutcher commented 10 months ago

A long time ago, the choice was made to use git diff-files rather than git diff in the stage view (f99c60950a00d72ca0fc7626de6034c704ea3883). It seems that git diff-files does not care about diff.orderFile.