Vscode-git-graph: "View File at Revision" for files in the Commit Details View

Created on 31 Mar 2020  Ā·  5Comments  Ā·  Source: mhutchie/vscode-git-graph

On the commit detail view, for a file that was affected by a commit, I can

  • Open a diff view of the file in for this commit
  • Open the current version of this file ("Click to open file").

However, I think it would be nice to be able to open a read-only view of this specific revision, without the diff view. In particular, "Click to open file" can fail if the file is absent from the current working directory, or can be confusing if the clicked revision is different from the current one.

This would help making vscode-git-graph even more awesome than it is already :)

feature request

Most helpful comment

Thanks for your quick reply, and explaining your use case!

Based on your response, I think it would be best to add ā€œOpen Revisionā€ buttons next to the ā€œOpen Fileā€ buttons in the Commit Details View. I’ll add this in an upcoming release!

All 5 comments

Hi @fsteinmetz, thanks for raising this improvement request!

Would you please let me know the use case for when a user would want to view a read-only preview of the file at the specific commit revision (using the ā€œClick to Open Fileā€ button), considering they can already see this exact read-only preview of the file on the right hand side of the Diff View?

The reason why I currently provide the Diff View, and Open File buttons in their current form is:

  • If the user wants see the change that occurred in the commit, or view the state of the file before or after the commit, they can click on the file name in the Commit Details View.
  • If the user wants to start coding in the same file that was created / modified in the commit, they can use the appropriate Open File button in the Commit Details View.

These buttons are currently designed to each cater for a unique use case / set of use cases, both adding their own value to the user.

Hi @mhutchie, and thanks for your quick answer!
I agree they can already see the same content on the right hand side of the diff, however personnally I am often interested in the file content at a specific commit, and not in the diff. In this case the diff view is of course cumbersome. vim-fugitive has this possibility through the :Gedit <commit>:<file> command ; gitlens also has both "open file" and "open revision" buttons at the top of diff views, and I think having these options in git-graph would be a plus.
I understand that opening the current file is useful as well, but I was wondering whether there might be a clutterless way to get all options. Maybe, following gitlens, as buttons at the top of the diff view, or as a button "open revision" next to the "open file" in the commit detail?

Thanks for your quick reply, and explaining your use case!

Based on your response, I think it would be best to add ā€œOpen Revisionā€ buttons next to the ā€œOpen Fileā€ buttons in the Commit Details View. I’ll add this in an upcoming release!

Great, thanks! šŸ‘

This will be available in v1.23.0.

If you'd like to use it before the next release, you can download v1.23.0-beta.3, and install it following the instructions provided here.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ackvf picture ackvf  Ā·  7Comments

Wosi picture Wosi  Ā·  5Comments

jboucly picture jboucly  Ā·  3Comments

kimyvgy picture kimyvgy  Ā·  7Comments

bboehmke picture bboehmke  Ā·  6Comments