-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Comments
FYI, vscode built-in diff view is usable as an arbitrary diff |
oh, how? |
Sorry I meant from inside an extension. |
Gotcha; this implies that GitLens could indeed build this feature, correct? Would you be interested in that? |
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. |
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. |
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. |
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". |
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. |
For some inspiration, this is implemented in edamagit - relevant code: |
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 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. |
I haven't used the Atom implementation of this, but I can say that I really really liked the way magit does it. |
Thanks for spotting that @lentzi90 ! If anyone is interested, I've published an extension Whole Diff that covers this, I think. |
Thanks @jacekkopecky, that's a really useful extension! |
Looks like vscode team is working on that microsoft/vscode#179000 |
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.
The text was updated successfully, but these errors were encountered: