+6

Log, Files view: allow to compare modified working tree against arbitrary commit

Marc Strapetz 2 years ago updated by Владимир Главный 1 month ago 4

Allow to select an arbitrary commit in the Log and compare it to the current working tree, including not yet staged local modifications of the working tree. Comparing against the current Index is covered by topic https://smartgit.userecho.com/topics/28.

TortoiseGit has this useful feature: https://tortoisegit.org/docs/tortoisegit/tgit-dug-diff.html

>If you want to see the difference between a particular revision and your working tree, use the Log dialog, select the revision >of interest, then select Compare with working tree from the context menu (cf. the section called “Log Dialog”).

Hello @Marc

Now I become a paying user. I working at Camtek ltd, and we purchase 5 licenses because of me. We willing to buy more if you can improve your amazing app.

As my last topic that decline: #1179

I want to add as you requested more info about: 'Editing the working tree when diffing against an arbitrary commit'

One use case is you want to add a specific things from the arbitrary commit. and not bring all changes from that commit like git cherry pick.
Go over file by file and add the specific things.

I also ask from my colleges that will comment here, and explain in their words why it important feature for us. 

Thank you.

> One use case is you want to add a specific things from the arbitrary commit. and not bring all changes from that commit like git cherry pick. Go over file by file and add the specific things.

In general this won't work well with a Working Tree - Commit comparison because this diff will include all changes between Working Tree and the commit and not only the commit's changes as patch, rewritten to the working tree, i.e. what a cherry-pick will do. It will be easier and safer to cherry-pick the corresponding commit without committing the cherry-pick, then use e.g. the Index Editor to unstage unwanted changes.

When I am doing it, the working tree is empty.
Second, in the same file I don't want all the changes. Not sure how to do it with cherry pick like you say.
Also more easy and intuitive to allow to diff commit with working tree that i can edit like other git clients that do that.
I already use this feature many time in git extension. But I would really love to see it in smartgit.