Add file history feature similar to diffview.nvim #176
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
barrettruth/diffs.nvim#176
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Prerequisites
Problem
It’s often useful to quickly see how a file changed over time and jump between previous revisions. In sindrets/diffview.nvim this is available via the
:DiffviewFileHistory %command (see https://github.com/sindrets/diffview.nvim#file-history), which shows the full commit history for the current file and lets you inspect changes per commit. I currently just usegit log -pbut it’s not as convenient.Proposed solution
I’d like something like
:Diff history %that opens a file history view for the current buffer. It should let me browse previous commits affecting the file and view the diff between the current state and a selected commit. Navigation between commits could be handled via keymaps or a small split panel at the bottom (similar to diffview.nvim’s file history UI).Thanks for the plugin, I really like it.
Alternatives considered
No response
isn't this the role of your git plugin (vim-fugitive etc)?
Yeah, vim-fugitive would work here, but I don't use it.
I used to rely on gitsigns, diffview.nvim, and the Git CLI in a separate tmux pane. About a week ago I switched from diffview.nvim to diffs.nvim because I find it more convenient overall.
The only feature I currently miss is DiffviewFileHistory. I realize this may be a fairly niche use case and that this functionality might be considered outside the scope of the plugin, so I completely understand if the feature request is declined
This is out of scope. Also note that if you use a picker (very likely) you can simply open up something like the "buffer gitcommits" file picker, send the files to the qfl/loclist, and then browse.
You could also probably write up a 20 line function that just populates the qfl too.