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

fix diff blame navigation #1338

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

fix diff blame navigation #1338

wants to merge 1 commit into from

Conversation

gcb
Copy link

@gcb gcb commented May 30, 2024

this does not "support" git options such as noprefix, mnemonicPrefix, etc. As in, they will not have the desired effect on diff view, like #1337 was trying to implement.

It just overrides them with the --default-prefix command line when getting the diffs, so blame navigation (e.g. pressing "b" in a diff) works.

fix #1336

@gcb
Copy link
Author

gcb commented May 30, 2024

About the failing tests... can either remove the existing places where diff prefixes are handled, or try to centralize them and cover all cases. e.g. https://github.com/jonas/tig/blob/tig-2.5.10/src/diff.c#L745 (there are others, searching for "prefix" on the log)

the places that have that code would still fail if .gitconfig have dstPrefix for example. ...and i couldn't find how to get whatever the heck is the prefix git will use, to avoid all that weird logic outside of git itself. In the end, i think forcing default-prefix is the safer way

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

Successfully merging this pull request may close these issues.

bug: fail to find filename if not showing prefixes
1 participant