Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to view diffs for many files in a single editor tab. #404

Open
rattrayalex-stripe opened this issue Jun 7, 2018 · 16 comments
Open
Labels
feature New feature or request help wanted Want community input and/or pull request needs-champion Needs a community champion to move this forward
Milestone

Comments

@rattrayalex-stripe
Copy link

Coming from #389 (comment)

I would like to be able to view the diff output of many files in a single editor tab, ideally in side-by-side mode.

For example, if I execute a codemod or find/replace across 100 files, I would like a single tab through which to scroll to verify my changes. For this purpose, I actually quite like the side-by-side view in VSCode. Currently, I use old-school git diff which is fine but not as nice.

If Gitlens/VSCode's diff viewer were usable for any arbitrary diff, I imagine this would be a trivial add-on.

@eamodio eamodio added the feature New feature or request label Jun 7, 2018
@eamodio eamodio added this to the Backlog milestone Jun 7, 2018
@eamodio eamodio added the help wanted Want community input and/or pull request label Jun 7, 2018
@eamodio
Copy link
Member

eamodio commented Jun 7, 2018

FYI, vscode built-in diff view is usable as an arbitrary diff

@rattrayalex-stripe
Copy link
Author

oh, how?

@eamodio
Copy link
Member

eamodio commented Jun 8, 2018

Sorry I meant from inside an extension.

@rattrayalex-stripe
Copy link
Author

Gotcha; this implies that GitLens could indeed build this feature, correct? Would you be interested in that?

@eamodio
Copy link
Member

eamodio commented Jun 9, 2018

Yup, exactly. I definitely do think it is quite interesting, but I can't promise anything about when I might get around to it ;)

But if someone else wants to take it on, I would certainly be willing to collaborate.

@alexeychikk
Copy link

I think it would be nice at least to add setting that will force VS Code to open new Git diff tab only if none diff tabs are opened and replace diff tab otherwise. The problem is that I want this behavior only for Git diffs but not for editor tabs.

@tojamrok
Copy link

tojamrok commented Jun 6, 2019

I'd expect that when pressing right mouse button over "GitLens view -> REPOSITORIES section -> branch -> commit" or over "GitLens view -> SEARCH COMMITS -> commit" the context menu would contain "show side-by-side diff of all changes".

Also, a config entry for "lines of context" just like in gitk tool.

So the difference between gitk and GitLens would be the side-by-side diff.

@lvella
Copy link

lvella commented Nov 1, 2020

This feature is specially interesting to review your staged code changes before you commit. I fell I am committing blindly if I can't scroll down through all my changes.

It is a common feature present in tools like GitHub, gitk, and even command line "git diff".

@eamodio
Copy link
Member

eamodio commented Nov 2, 2020

Yes, I would definitely like this feature too. But this isn't something that I will likely add myself anytime soon, but if the community wants to champion it and provide a PR (after discussions) I'm certainly open to it -- of course, depending on the complexity and scope of the changes required.

@zzjin
Copy link

zzjin commented Apr 20, 2021

Maybe add two more button in changes view will work.
image

@The-Compiler
Copy link

For some inspiration, this is implemented in edamagit - relevant code:

@lentzi90
Copy link

Hi! I'm here because of Github sunsetting Atom. This feature is something I'm missing very much now after trying VS Code for a couple of days. I'm surprised there isn't more demand for this. Are people actually clicking through the individual files and scrolling through them to see all changes?

While I do use the features to check individual file diffs, history and so on occasionally, it is way more common for me to want a quick look at what a particular commit is doing across all files. In Atom, this is a single click operation: click the commit and the diff of this opens in the current pane. It is very similar to git show or a PR diff. Only a few lines around the changes are visible.

As a comparison, in VS Code with Git Lens, the single click only unfolds the commit to view what files changed. Then one has to click through the files to see what changed in each of them. (And the full file is visible so you also have to scroll through it completely to make sure you see all changes.)

I realize there isn't a great chance this will be prioritized just because of my comment here, but please consider that there are now Atom users out there looking for alternatives. The git integration was the main reason I stuck with Atom instead of switching to VS Code. Now I find myself forced to move. Most things in VS Code work better/faster, but since I'm working a lot with git, I find that this missing feature is a big pain.

@neongreen
Copy link

I haven't used the Atom implementation of this, but I can say that I really really liked the way magit does it.

@jacekkopecky
Copy link

Thanks for spotting that @lentzi90 !

If anyone is interested, I've published an extension Whole Diff that covers this, I think.

@carlfriedrich
Copy link

Thanks @jacekkopecky, that's a really useful extension!

@Igorgro
Copy link

Igorgro commented Aug 6, 2023

Looks like vscode team is working on that microsoft/vscode#179000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request help wanted Want community input and/or pull request needs-champion Needs a community champion to move this forward
Projects
None yet
Development

No branches or pull requests