We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f736f3b commit fbf6a64Copy full SHA for fbf6a64
1 file changed
src/ViewModels/CreateBranch.cs
@@ -186,20 +186,9 @@ public override async Task<bool> Sure()
186
.CreateAsync(_baseOnRevision, _allowOverwrite);
187
}
188
189
- if (succ && BasedOn is Models.Branch { IsLocal: false } basedOn)
+ if (succ && BasedOn is Models.Branch { IsLocal: false } basedOn && _name.Equals(basedOn.Name, StringComparison.Ordinal))
190
{
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)
+ await new Commands.Branch(_repo.FullPath, _name)
203
.Use(log)
204
.SetUpstreamAsync(basedOn);
205
0 commit comments