Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » EGit Compare Viewer(Shows ID of prior commit, not ID of last change)
EGit Compare Viewer [message #1859320] Tue, 30 May 2023 21:42 Go to next message
Ray Martin is currently offline Ray MartinFriend
Messages: 22
Registered: May 2023
Junior Member
My last local commit changed main.c and the lower right of the History panel lists that file.

If I double-click main.c in that list, it opens the "C" Compare Viewer. It highlights the changes but the commit ID it references is simply the prior commit, which in this case didn't change main.c.

I suppose this is technically correct but it's also misleading. Shouldn't it by default reference the commit ID that previously changed that file rather than the ID of the prior commit?
Re: EGit Compare Viewer [message #1859405 is a reply to message #1859320] Mon, 05 June 2023 16:37 Go to previous messageGo to next message
Ray Martin is currently offline Ray MartinFriend
Messages: 22
Registered: May 2023
Junior Member
Added image that highlights the issue. Items "A" - "D" in that image are summarized below:

A - Latest commit changed main.c. Double click that file in "changed" list.
B - Compare view shows changes from prior commit (28558f8)
C - That commit didn't change main.c
D - Prior commit that changed main.c is D436726

I have to manually click each commit to find the previous one that changed that file. Not a big deal if repo only has a few commits but it could have many more.

EGit version is 6.5.0.2023

index.php/fa/43237/0/
Re: EGit Compare Viewer [message #1859582 is a reply to message #1859405] Fri, 16 June 2023 19:46 Go to previous message
Thomas Wolf is currently offline Thomas WolfFriend
Messages: 576
Registered: August 2016
Senior Member
We actually had it the way you suggest/expect a while back. That turned out to be confusing in other contexts, though. It also comes with a non-negligible cost -- imagine a file last touched thousands of commits ago: one would have to traverse the history back until one hits that commit.

But EGit could probably choose one or the other method, depending on how exactly the comparison was triggered.

You might also want to explore "Focus on this file" in the history view, which filters the history to only show commits that touch that file. Or the "Link with Editor and Selection" button (top right in the view, two arrows pointing left and right), which does the same based on the current active editor or selection. That can be customized via the "File Scope for History" button (the funnel).
Previous Topic:EGit still shows remote tracking branch after delete
Next Topic:Connection failed from Git to Eclipse
Goto Forum:
  


Current Time: Fri Apr 19 04:04:19 GMT 2024

Powered by FUDForum. Page generated in 0.01847 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top