Bug 552998 - Git history sometimes shows nothing
Summary: Git history sometimes shows nothing
Status: RESOLVED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: 5.6   Edit
Hardware: PC All
: P3 major (vote)
Target Milestone: 5.6   Edit
Assignee: Thomas Wolf CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-13 08:40 EST by Thomas Wolf CLA
Modified: 2019-11-13 09:24 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wolf CLA 2019-11-13 08:40:00 EST
To reproduce:

Have both eclipse.platform.team and eclipse.platform.ui in the git repositories view.  Open an editor on /org.eclipse.compare/compare/org/eclipse/compare/internal/CompareLinkHelper.java (either from the package explorer or from the working tree in the repo view directly; it doesn't matter whether projects have been imported).

Have the history view open, select eclipse.platform.ui in the repo view. The history view shows the history of that repo.

Now click into the open editor for CompareLinkHelper.java.

Expected: the history of that file is shown (1 commit, e0dddbcd in eclipse.platform.team)

Actual: the history is empty. The view does show the correct path and repository, though.
Comment 1 Thomas Wolf CLA 2019-11-13 08:45:27 EST
Caused by commit 626d2927. That commit tries to show HEAD if it changed, and sets the commitToLoad for the GenerateHistoryJob to HEAD. But HEAD is not part of that file's history, and somehow the job then never triggers any UI update.

It appears that commitToLoad can be used only if a history has already been loaded, but not for the initial load. (In the above steps the repo changes, so EGit will do an initial load of the eclipse.platform.team history.)
Comment 2 Eclipse Genie CLA 2019-11-13 08:53:57 EST
New Gerrit change created: https://git.eclipse.org/r/152581
Comment 3 Eclipse Genie CLA 2019-11-13 09:23:35 EST
Gerrit change https://git.eclipse.org/r/152581 was merged to [master].
Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=32bb8c1c6c718343988e42f8932bdc9ef43a0a19