Skip to content

Sort settings not honored by Branches, Remotes, and Tags views #5109

@eamodio

Description

@eamodio

Summary

The sortBranchesBy and sortTagsBy settings are not applied when rendering branches and tags in tree views. The sort toolbar commands update the configuration, and the views refresh in response, but the orderBy value is never passed through to the sorting functions — branches and tags always sort by the hardcoded default date:desc.

Impact

Users changing the sort order via the Branches, Remotes, or Tags view toolbar see no effect. The sort commands were added in #4738 but the wiring to the actual sorting was incomplete — only the quick-pick wizard reads the config value.

Affected Views

  • Branches viewBranchesNode passes sort options without orderBy
  • Remotes viewRemoteNode passes sort: true without orderBy
  • Tags viewTagsNode passes sort: true without orderBy
  • Repositories view — reuses the same nodes, so also affected

Contributors, Worktrees, and Repositories views are not affected — they use wrapper functions that correctly read the config.

Validation

  1. Open the Branches view and sort by name — branches should reorder alphabetically
  2. Switch to sort by date — branches should reorder by most recent commit
  3. Repeat for Tags view and Remotes view
  4. Verify quick-pick sorting still works independently

Metadata

Metadata

Assignees

Labels

area-viewsIssues or features related to (tree) viewsverified ✔Verified

Type

No fields configured for Bug.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions