diffview.nvim icon indicating copy to clipboard operation
diffview.nvim copied to clipboard

[Feature] Add action for diffing the selected commit range from the history panel

Open LintaoAmons opened this issue 2 years ago • 3 comments

So in IDEA, when we do code review, I like to filter by the commit author's name, then select all the commits made within today, and show to diff view made by all of the commits to save some time.

So wondering if I can achieve the same workflow by diffview.nvim.

Currently I know I can do something like DiffviewOpen SHA1-SHA2 to view all the changes made by the commits in between. But because in my usecase, I need to filter the commits firstly, so the commits is actually discret.

So I was thinking if I can firstly use DiffviewFileHistory, then filter, then select some of the reminding entries, then toggle DiffviewOpen

image

LintaoAmons avatar Oct 16 '23 06:10 LintaoAmons

To do the filtering part in 1 step, you could do:

:DiffviewFileHistory --author="<name>" --since="1 day"

But we don't currently have a way to open a diff for a selected range in the history panel. That sounds useful though. Like an action that lets you visually select a range of commits from the history panel, to open in :DiffviewOpen.

sindrets avatar Oct 16 '23 09:10 sindrets

Hahaha, yeah, if can have that, I will be the coolest guy among my colleagues

LintaoAmons avatar Oct 16 '23 15:10 LintaoAmons

I also really want this feature, this will make diffview.nvim very convenient. Before, I copied two commit ids separately and then open a diff view with DiffviewOpen id1...id2, which was very troublesome.

imroc avatar Nov 17 '23 09:11 imroc