Community
Participate
Working Groups
This was fixed for one case (fetch from Gerrit) in bug 437362. But in the general case this apparently never worked. Just do a "Fetch from upstream" and observe FETCH_HEAD staying put even if there are new refs. The underlying reason is that JGit doesn't send an event when updating FETCH_HEAD. If branches are updated, EGit does get a RefsChangedEvent, but that is sent before FETCH_HEAD is updated. Should we make JGit fire a new FetchHeadChangedEvent that EGit could listen to? Then the GitHistoryPage could update properly.
(In reply to Thomas Wolf from comment #0) > This was fixed for one case (fetch from Gerrit) in bug 437362. > > But in the general case this apparently never worked. Just do a "Fetch from > upstream" and observe FETCH_HEAD staying put even if there are new refs. > > The underlying reason is that JGit doesn't send an event when updating > FETCH_HEAD. If branches are updated, EGit does get a RefsChangedEvent, but > that is sent before FETCH_HEAD is updated. > > Should we make JGit fire a new FetchHeadChangedEvent that EGit could listen > to? Then the GitHistoryPage could update properly. +1 for adding an event fired when FETCH_HEAD changed Do we need another event for ORIG_HEAD ?
Didn't notice such problems with ORIG_HEAD; presumably because it'll be set _before_ changes occur, so EGit will pick it up automatically on a RefsChanged/IndexDiffChanged event? I'm not 100% sure a new event is right, though. Perhaps the reason for it not existing (yet) is that the assumption was that FETCH_HEAD changes only on fetch/pull, and any user of JGit knows when it invokes a fetch/pull and thus knows whether or not it should update anything... Which means EGit would, like it does for "Fetch from Gerrit", fire its own event whenever it did a fetch. Not sure what's better.