Bug 558363 - Sharing a project requires manual refresh for working tree in Git repository view
Summary: Sharing a project requires manual refresh for working tree in Git repository ...
Status: NEW
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2019-12-16 08:13 EST by Lars Vogel CLA
Modified: 2022-05-11 06:29 EDT (History)
2 users (show)

See Also:


Attachments
Screenshot (1.37 MB, image/gif)
2019-12-16 08:17 EST, Lars Vogel CLA
no flags Details
Before I select Team -> Share (196.97 KB, image/png)
2022-05-11 01:12 EDT, Lars Vogel CLA
no flags Details
After I share (389.18 KB, image/png)
2022-05-11 01:12 EDT, Lars Vogel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Vogel CLA 2019-12-16 08:13:55 EST
If I share a project in Egit its representation in the Git repository working tree is not updated automatically.

Screencast to follow soon.
Comment 1 Lars Vogel CLA 2019-12-16 08:17:38 EST
Created attachment 281245 [details]
Screenshot
Comment 2 Thomas Wolf CLA 2019-12-16 09:47:33 EST
The label of the repo does update. Probable cause: the view listens to the JGit IndexChangeEvent, while the label provider listens on EGit's own IndexDiffChangedEvent event. JGit is not aware of files having been moved; EGit OTOH reacts on ResourceChangedEvents.

Possibly the solution could be as simple as also using IndexDiffChangedEvent in the view. Potential pitfall: that event is be triggered later. Remains to be seen whether that might cause other problems. (It shouldn't, but the whole repo view updating already uses a number of background jobs...)
Comment 3 Lars Vogel CLA 2019-12-17 18:22:54 EST
Similar to remote tracking branches -> they are not updated if I fetch, manual refresh is necessary
Comment 4 Thomas Wolf CLA 2019-12-18 03:43:20 EST
(In reply to Lars Vogel from comment #3)
> Similar to remote tracking branches -> they are not updated if I fetch,
> manual refresh is necessary

That would be something else, and I cannot reproduce.
Comment 5 Lars Vogel CLA 2019-12-18 04:37:15 EST
(In reply to Thomas Wolf from comment #4)
> (In reply to Lars Vogel from comment #3)
> > Similar to remote tracking branches -> they are not updated if I fetch,
> > manual refresh is necessary
> 
> That would be something else, and I cannot reproduce.

Maybe an older EGit version at the client. I check later once we cover remotes in our current Git training (planned for tomorrow). Unfortunately we do not have another "Thomas Wolf" in our recent Egit trainings who takes over the burden of enhancing EGit after the Git training. :-)
Comment 6 Lars Vogel CLA 2020-01-06 09:30:00 EST
(In reply to Thomas Wolf from comment #2)
> The label of the repo does update. Probable cause: the view listens to the
> JGit IndexChangeEvent, while the label provider listens on EGit's own
> IndexDiffChangedEvent event. JGit is not aware of files having been moved;
> EGit OTOH reacts on ResourceChangedEvents.
> 
> Possibly the solution could be as simple as also using IndexDiffChangedEvent
> in the view. Potential pitfall: that event is be triggered later. 

Later is better than never. :-)
Comment 7 Lars Vogel CLA 2020-09-17 05:30:47 EDT
Had this again in yesterday customer training.
Comment 8 Lars Vogel CLA 2022-05-11 01:11:33 EDT
Still happens in Windows with latest EGit release.
Comment 9 Lars Vogel CLA 2022-05-11 01:12:06 EDT
Created attachment 288506 [details]
Before I select Team -> Share
Comment 10 Lars Vogel CLA 2022-05-11 01:12:40 EDT
Created attachment 288507 [details]
After I share

As you can see the "Working Tree" is not updated.
Comment 11 Thomas Wolf CLA 2022-05-11 06:29:57 EDT
Possibly related: bug 553064.