Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 361784 - First Team > Synchronize Workspace should inform the user about the fetch preference
Summary: First Team > Synchronize Workspace should inform the user about the fetch pre...
Status: NEW
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: 1.2   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-24 05:33 EDT by Dani Megert CLA
Modified: 2012-10-09 06:30 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2011-10-24 05:33:51 EDT
Verified in 1.2.0.201110190928.

1. commit and push some changes to a shared repository
2. in another workspace select a project from the shared repositpory
3. Team > Synchronize Workspace
   ==> no changes
4. Pull from Upstream
   ==> it says no ref to fetch from origin

This is unexpected since I never did a fetch before. It looks like synchronize operation did a fetch without asking me. This is very bad as I now don't have an easy way to see the list of all incoming commits since my last explicit fetch.

Either this side-effect should be removed or put into a preference which is off by default.

BTW: Why does synchronize do this but not reset hard?
Comment 1 Dani Megert CLA 2011-10-24 05:36:32 EDT
> Either this side-effect should be removed or put into a preference which is off
> by default.

Aaah! There is already a preference for this but it is on by default.

==> Disable it by default or ask the user when doing the very first synchronization and then store that preference.
Comment 2 Dani Megert CLA 2011-10-24 05:39:03 EDT
Also, just found Team > Advanced > Synchronize > Customm...
In that dialog there is a checkbox for the preference. This could be removed and always use the preference value.
Comment 3 Dariusz Luksza CLA 2011-10-24 08:35:07 EDT
(In reply to comment #2)
> Also, just found Team > Advanced > Synchronize > Customm...
> In that dialog there is a checkbox for the preference. This could be removed
> and always use the preference value.

Check box in synchronize wizard is to over roll value set in preference. Is is by default set to value from preferences but it can be changed only for this single synchronization. There are some use cases when you would like to enable/disable fetching changes for on "synchronize session".
Comment 4 Dani Megert CLA 2011-10-24 08:44:51 EDT
(In reply to comment #3)
> (In reply to comment #2)
> > Also, just found Team > Advanced > Synchronize > Customm...
> > In that dialog there is a checkbox for the preference. This could be removed
> > and always use the preference value.
> 
> Check box in synchronize wizard is to over roll value set in preference. Is is
> by default set to value from preferences but it can be changed only for this
> single synchronization. There are some use cases when you would like to
> enable/disable fetching changes for on "synchronize session".

I see. The problem with this is that dialogs should normally store the previously chosen values. If the one-time only override is really needed then we should add a link to the preference where the default can be configured.
Comment 5 Dariusz Luksza CLA 2011-10-24 08:50:13 EDT
(In reply to comment #4)
> I see. The problem with this is that dialogs should normally store the
> previously chosen values. If the one-time only override is really needed then
> we should add a link to the preference where the default can be configured.

I like this idea with link to preference page. IMO dialog shouldn't overwrite stored preferences, we can change check box message to "Fetch changes from remote this time" or something like that.
Comment 6 Dani Megert CLA 2011-10-24 08:54:18 EDT
(In reply to comment #5)
> (In reply to comment #4)
> > I see. The problem with this is that dialogs should normally store the
> > previously chosen values. If the one-time only override is really needed then
> > we should add a link to the preference where the default can be configured.
> 
> I like this idea with link to preference page. IMO dialog shouldn't overwrite
> stored preferences, we can change check box message to "Fetch changes from
> remote this time" or something like that.

I think if you have a link to the default then the current text is OK. Take a look at the New Class wizard for example.
Comment 7 Dariusz Luksza CLA 2012-05-08 16:54:06 EDT
Are you sure that projects in those two separate workspace doesn't share same local git repository on your hard drive ?

Synchronize operation at the beginning by default fetches changes to show you incoming changes. You can disable this functionality in preferences (Team -> Git -> Synchronize -> Always launch fetch before synchronize).
Comment 8 Dani Megert CLA 2012-07-23 08:47:39 EDT
(In reply to comment #7)
> Are you sure that projects in those two separate workspace doesn't share same
> local git repository on your hard drive ?
> 
> Synchronize operation at the beginning by default fetches changes to show you
> incoming changes. You can disable this functionality in preferences (Team ->
> Git -> Synchronize -> Always launch fetch before synchronize).

See comment 1.
Comment 9 Dani Megert CLA 2012-10-09 06:30:06 EDT
When I filed this bug I was not aware of the preference, so for me this is no longer a major issue. For new users it would be good though to inform him when he does the very first Team > Synchronize.