Skip to content

jacekkopecky/vscode-whole-diff

Repository files navigation

Whole Diff VSCode Extension

This extension makes it possible to view the whole diff for working tree changes, staged changes, or a specific commit or stash (in GitLens commits/shashes lists).

Features

The extension adds an icon to the "Staged Changes" and "Changes" groups which will open a diff that shows all the changes in a single diff file.

Whole Diff buttons

The same icon is also added to GitLens Commits, Stashes, and Branches lists, where it opens the diff for that commit, stash, or the whole branch (from the common ancestor with HEAD). It's also there when you compare two commits.

Whole Diff buttons on commits

With an extension like Diff Viewer, the diff looks like this:

A whole diff opened

There are also two new commands in the command pallette:

  1. Show whole diff of staged changes
  2. Show whole diff of working tree

You can add keyboard shortcuts to your liking for these commands.

Requirements

This extension works best together with an extension that shows a diff file graphically; I use Diff Viewer by Guilherme Caponetto.

Extension Settings

  • diffEditor.ignoreTrimWhitespace is used to generate whitespace-ignoring diffs (with git diff -b)
  • diffviewer.outputFormat controls whether to show side-by-side or inline diffs

This extension has no settings of its own. Let me know if you want any settings; for example to hide the buttons in a context menu.

Known Issues

  1. The diffs don't automatically refresh when there are git or settings changes; you have to run the command or click the button again.
  2. The extension will misbehave (not find diffs) for branches that have . in the name.

Release Notes

See CHANGELOG.md

About

Whole Diff extension for VSCode

Resources

License

Stars

Watchers

Forks

Packages

No packages published