File tree Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -186,20 +186,9 @@ public override async Task<bool> Sure()
186186 . CreateAsync ( _baseOnRevision , _allowOverwrite ) ;
187187 }
188188
189- if ( succ && BasedOn is Models . Branch { IsLocal : false } basedOn )
189+ if ( succ && BasedOn is Models . Branch { IsLocal : false } basedOn && _name . Equals ( basedOn . Name , StringComparison . Ordinal ) )
190190 {
191- var autoSetUpstream = true ;
192- foreach ( var b in _repo . Branches )
193- {
194- if ( b . IsLocal && b . Upstream . Equals ( basedOn . FullName , StringComparison . Ordinal ) )
195- {
196- autoSetUpstream = false ;
197- break ;
198- }
199- }
200-
201- if ( autoSetUpstream )
202- await new Commands . Branch ( _repo . FullPath , _name )
191+ await new Commands . Branch ( _repo . FullPath , _name )
203192 . Use ( log )
204193 . SetUpstreamAsync ( basedOn ) ;
205194 }
You can’t perform that action at this time.
0 commit comments