simplify single-branch logic

This commit is contained in:
Stephanie You
2023-12-05 09:53:02 -08:00
parent 4ec6d2b9fe
commit 6b54e53586
+1 -1
View File
@@ -215,7 +215,7 @@ func CloneRemote(ctx context.Context, srcDB *doltdb.DoltDB, remoteName, branch s
// create remote refs corresponding to each of them. We delete all of
// the local branches except for the one corresponding to |branch|.
for _, br := range branches {
if !singleBranch || (singleBranch && br.GetPath() == branch) {
if !singleBranch || br.GetPath() == branch {
cs, _ := doltdb.NewCommitSpec(br.GetPath())
cm, err := dEnv.DoltDB.Resolve(ctx, cs, nil)
if err != nil {