Bug 574568 - [compare] add compare patches action in history view
Summary: [compare] add compare patches action in history view
Status: NEW
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-30 08:02 EDT by Alexander Nittka CLA
Modified: 2021-06-30 09:29 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Nittka CLA 2021-06-30 08:02:25 EDT
Currently, a lot of work is done with respect to compare/merge. Thanks for that!
I am wondering how much effort it would be to add a "compare patches" feature for two selected commits in the history view; and whether you would consider this feature helpful.

The use case I have in mind is rebasing involving a manually resolved conflict. If I have the original remote tracking branch (or a backup-branch), currently, I can compare the corresponding commits before and after rebasing, but of course the diff involves all that has been happening in between. What I would be interested in would be the diff between the actual patches in order to check whether I made a mistake while resolving the conflict.

A current workaround is to copy the patch shown in the history view when selecting all files for both commits, pasting that into separate files and comparing those files. But this is quite cumbersome.

(I am aware that a comparison of arbitrary commits would yield quite useless results. Maybe a reasonable restriction for making this action available would be if both commits had the same authoring information - author+timestamp as this would indicate that the two commits actually correspond with each other.)
Comment 1 Thomas Wolf CLA 2021-06-30 09:29:52 EDT
Interesting use case. I never had a need for this, but if it can be done easily, why not.

Using Andrey's AnyEditTools, the functionality is already there:

1. Open commit 1 in the commit viewer viewer, switch to the diff tab.
2. Open commit 2 in the commit viewer viewer, switch to the diff tab.
3. In the content menu, choose "Compare With->Opened Editor..." and choose the
   other commit editor.

Voilà.