+2

Changes view: add HEAD vs Working Tree view

andrew pashkin 6 years ago updated by Costy 2 years ago 10

Currently two changes views are available:

- HEAD vs Index

- Index vs Working Tree


Image 202


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?

+1

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.

I haven't updated SmartGit in a while, and now I updated to version 21 and when I hit F4 this no longer appears.


I got used to this feature. Is it gone now ? Or does someone know where it has moved ?

It depends on what state the file has and what kind of view options of the Files table are selected.

My use case if a file which has some changes staged and some not. So I wish to quickly check what I staged, but I don't want to open the Index Editor because 1. I have lots of changes unstaged, and 2. this file has long lines so I prefer to see just a 2-way diff instead of 3-way diff for this little use case.

My muscle memory was, Ctrl+Alt+T for the IndexEditor, stage just 2-3 of the 100 changes, Ctrl+S, Ctrl+F4. Then do a quick check, F4, hit the up arrow 2 times to show diff between HEAD and index, Enter. F6 to quickly navigate to the 3-rd stage. Never touch a mouse and be done in 10 seconds :)

What do you mean by "Files table" ?