File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -38,15 +38,17 @@ public bool Force
38
38
set => _repo . Settings . EnableForceOnFetch = value ;
39
39
}
40
40
41
+ private bool _fetchPreferedRemote = false ;
42
+
41
43
public Fetch ( Repository repo , Models . Remote preferredRemote = null )
42
44
{
43
45
_repo = repo ;
44
- // _fetchAllRemotes = preferredRemote == null;
45
46
_fetchAllRemotes = _repo . Settings . FetchAllRemotes ;
46
47
47
48
if ( preferredRemote != null )
48
49
{
49
50
SelectedRemote = preferredRemote ;
51
+ _fetchPreferedRemote = true ;
50
52
}
51
53
else if ( ! string . IsNullOrEmpty ( _repo . Settings . DefaultRemote ) )
52
54
{
@@ -69,7 +71,7 @@ public override async Task<bool> Sure()
69
71
var log = _repo . CreateLog ( "Fetch" ) ;
70
72
Use ( log ) ;
71
73
72
- if ( all )
74
+ if ( all && ! _fetchPreferedRemote )
73
75
{
74
76
foreach ( var remote in _repo . Remotes )
75
77
await new Commands . Fetch ( _repo . FullPath , remote . Name , notags , force )
@@ -94,6 +96,7 @@ public override async Task<bool> Sure()
94
96
95
97
_repo . MarkFetched ( ) ;
96
98
_repo . SetWatcherEnabled ( true ) ;
99
+ _fetchPreferedRemote = false ;
97
100
return true ;
98
101
}
99
102
You can’t perform that action at this time.
0 commit comments