Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
pkitszel opened this issue Dec 29, 2023 · 1 comment
Open

Comments

@pkitszel
Copy link

pkitszel commented Dec 29, 2023

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
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants