You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to be able to only see the commits and diff preview of the currently opened file.
Furthermore, on selection i don't want to do a git checkout, but view the open file in a new buffer at the time of the selected commit.
Solution
I created an extension telescope-git-ex.nvim
Which uses git show to retrieve the file at the selected commit and creates a new buffer with the content.
Maybe if you deem this feature useful enough, it could be integrated and further enhanced as this is just a proof of concept.
(Picker only displays commits featuring the open file)
(Opens a new buffer with the file at the selected commit)
The text was updated successfully, but these errors were encountered:
Pyons
changed the title
Feature: Builtin git only display commits for current file and view file content at selected commit
Feature: Builtin git only display commits for current file and view file contents at selected commit
Mar 8, 2021
We already have Telescope git_bcommits which only shows commits with the current file, and i am almost done with #528, just one small thing missing, like 1/2 days. That will allow you to cycle thought different previewers and we will have a git diff to parent, diff to head, git show, git commit message previewer configured.
It will also have a diff view on <c-v>, <c-x> and <c-t> and i think bcommits will now checkout file (git checkout sha -- file) if i recall correctly
I want to be able to only see the commits and diff preview of the currently opened file.
Furthermore, on selection i don't want to do a
git checkout
, but view the open file in a new buffer at the time of the selected commit.Solution
I created an extension telescope-git-ex.nvim
Which uses
git show
to retrieve the file at the selected commit and creates a new buffer with the content.Maybe if you deem this feature useful enough, it could be integrated and further enhanced as this is just a proof of concept.
(Picker only displays commits featuring the open file)
(Opens a new buffer with the file at the selected commit)
The text was updated successfully, but these errors were encountered: