Skip to content

osfs: sort ReadDir output by filename#214

Open
erka wants to merge 1 commit into
go-git:mainfrom
erka:sorted-files
Open

osfs: sort ReadDir output by filename#214
erka wants to merge 1 commit into
go-git:mainfrom
erka:sorted-files

Conversation

@erka
Copy link
Copy Markdown

@erka erka commented May 21, 2026

The Dir interface contract requires ReadDir to return entries sorted
by filename. Both RootOS.ReadDir and BoundOS.ReadDir now fulfill this
by sorting with slices.SortFunc + cmp.Compare in RootOS.ReadDir, with
BoundOS.ReadDir delegating to it.

The Dir interface contract requires ReadDir to return entries sorted
by filename. Both RootOS.ReadDir and BoundOS.ReadDir now fulfill this
by sorting with slices.SortFunc + cmp.Compare in RootOS.ReadDir, with
BoundOS.ReadDir delegating to it.

Signed-off-by: Roman Dmytrenko <rdmytrenko@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant