Changes view: add HEAD vs Working Tree view

andrew.pashkin 2 years ago updated by Andrew Pashkin 2 years ago 7

Currently two changes views are available:

- HEAD vs Index

- Index vs Working Tree

I propose to add the third one: "HEAD vs Working Tree", which would ignore Index and show diff between the current state of the working directory and the latest commit.

This is not a feature I have needed a lot, but could use this feature right now. :-)

Please use the normal Compare which supports it.

How to use this functionality?

To open a compare between HEAD and working tree (so you can edit it) for a file with staged changes, please select this option in the preferences.

And what exactly does it do? I can't find anything in the online documentation about it.

Err, the compare is invoked with the HEAD and working tree file contents. Isn't that what you actually want to do - except that you just want to see it in the Changes view, whereas this work-around is about the separate Compare window?


Oh, I see now - you meant the window that appears when you press F4 or click "show changes".

But wouldn't it be more obvious to have this mode listed in the changes menu instead of burying it in the "Preferences" window? Moreover there is already such a list which appears if you have manually edited index and hit F4:

So what I'm proposing is to simplify compare-mode selection by making it available in the Changes menu and is explicitly set by user.