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

Filename detection in "deleted file" diffs #1334

Closed
grawity opened this issue May 14, 2024 · 1 comment
Closed

Filename detection in "deleted file" diffs #1334

grawity opened this issue May 14, 2024 · 1 comment

Comments

@grawity
Copy link
Contributor

grawity commented May 14, 2024

In all current versions, when the cursor is over a diff belonging to a deleted file, i.e. where git shows

--- a/foo.c
+++ /dev/null

the window statusbar shows [diff] Changes to '/dev/null' and pressing f attempts to open /dev/null as a blob.

Would it be possible for view-blob to show the old file in this situation, even though it normally shows the new file?

@koutcher
Copy link
Collaborator

Yes, we could use the same logic as when opening the blame view from the diff view to identify the blob corresponding to the diff line.

koutcher added a commit to koutcher/tig that referenced this issue May 16, 2024
koutcher added a commit to koutcher/tig that referenced this issue May 21, 2024
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