Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc81c660

Browse files
committed
Merge branch 'cli-deduplicate-branches' into 'master'
fix: deduplicate branches in the CLI list commandSee merge request postgres-ai/database-lab!1065
2 parents3a9a11c +1f68841 commitc81c660

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

‎engine/pkg/client/dblabapi/branch.go‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
"encoding/json"
1111
"fmt"
1212
"net/http"
13+
"slices"
1314
"sort"
1415

1516
"gitlab.com/postgres-ai/database-lab/v3/pkg/client/dblabapi/types"
@@ -44,6 +45,7 @@ func (c *Client) ListBranches(ctx context.Context) ([]string, error) {
4445
listBranches=append(listBranches,branchView.Name)
4546
}
4647

48+
listBranches=slices.Compact(listBranches)
4749
sort.Strings(listBranches)
4850

4951
returnlistBranches,nil

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp