vscode-git-graph icon indicating copy to clipboard operation
vscode-git-graph copied to clipboard

Show File Diffs within the Git Graph View

Open rbalet opened this issue 5 years ago • 9 comments

Describe the feature that you'd like Would be amazing to be able to see the change made to the code directly from the Git Graph panel So, we could see one after the other without having to open it, look at it, close it, open the next one, ...

  1. activate view in code toggle
  2. on click, set the line as "selected" (TAB to move to the next one would be nice)
  3. the overview of the code image

rbalet avatar Nov 06 '19 08:11 rbalet

Thanks for raising this feature request!

I thought about including a Diff view previously, however ultimately decided against it as I feel that the extension should complement Visual Studio Code (using its Diff View), not duplicate it. (Although I definitely understand the motivation for having a Diff View within the Git Graph View)

Depending on your monitor resolution and/or your Diff View settings in Visual Studio Code, configuring the extension setting Open Diff Tab Location to Beside might streamline the process you're describing.

I'll keep this feature request open for discussion to gauge user interest in this functionality. I'd be happy to implement it if I have an indication that a significant portion of users would routinely use it.

mhutchie avatar Nov 06 '19 09:11 mhutchie

Well, it's kind of exactly what I needed :) Sorry for not having looked more attentively at the doc.

Is it a way to have it below instead of beside?
like this one image

rbalet avatar Nov 06 '19 18:11 rbalet

When the extension calls the vscode.diff command to open the Visual Studio Code Diff View, it accepts the options of vscode.TextDocumentShowOptions (according to this page & the codebase). vscode.TextDocumentShowOptions has this interface, which only lets you specify a ViewColumn as defined here. The ViewColumn can be set to “Active” or “Beside” (that I already make available), but they don’t provide a “Below” option.

I've just had a look at how the Visual Studio Code Merge Conflict Extension works (I just realised that was what your screenshot was showing), and it has a work around to open the Diff View below the active tab. It achieves this by:

  1. Creating a new editor group below the active view by running the command workbench.action.newGroupBelow.
  2. Once the command has executed, the active tab is now below the previously active view.
  3. Running the vscode.diff command, and setting the option as the Active tab will open the Diff View below the previously active view.

Note: The issue with using this approach alone is that it will always create a new editor group below, and not reuse a previously opened editor group below the Git Graph View.

I'll experiment to see if I can do the same thing but avoid this issue, so that a Below option could be added to Git Graph.

mhutchie avatar Nov 06 '19 19:11 mhutchie

Well, this issue haven't an High priority for me.
I added an issue vsCode github.
I'll keep you informed if something move in this direction.

rbalet avatar Nov 07 '19 08:11 rbalet

The issue is accepted, juste have to wait for it
https://github.com/microsoft/vscode/issues/84113

Since it stand as feature request, I'll thanks everyone that goes on this issues and give a :+1: so it's may be prioritize by the microsoft team :)

rbalet avatar Nov 08 '19 19:11 rbalet

What a pity that this issue didn't receive the needed 20 upvotes.

However I also would be happy to have the Below-option.

ghost avatar May 08 '21 10:05 ghost

+1 for showing diffs in the Git Graph View. Plus, is it possible to use diff command format instead of side-by-side? This format is sometimes easier to recognize, especially when there are changes over multiple files.

image

aoyama-val avatar May 06 '23 08:05 aoyama-val

Omg

I used "Open New Tab Editor Group" option, and selected "2" Now I can browse every files and see the diffs in a split second.

Thanks for this amazing VS Code GitGraph extention ! Best regards

PS> having it directly in the Git Graph view would indeed be terrific... what we love is to be able to see other team members' work very fast :)

castaway- avatar Sep 21 '23 15:09 castaway-

Is it possible to show the diff inside the right window of the preview, i.e., where the name of the files and the +/- lines count for each file is shown.

capelbea avatar Jan 31 '24 09:01 capelbea