Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make fs::walkdir_sorted_new() sort entries by paths literally (#1928) #1931

Merged
merged 3 commits into from
Apr 6, 2025

Conversation

yuja
Copy link
Contributor

@yuja yuja commented Apr 5, 2025

This follows up 7b1b5bf. Since packed-refs
appears to be sorted by full ref name, loose-refs should also be emitted in
that order.

The comparison function is copied from gix::diff::object::tree::EntryRef.
Non-utf8 file names are simply mapped to "" on Windows. We could add some
fallback, but callers can't handle such file names anyway.

#1928

@yuja yuja force-pushed the push-klrqpplwxrkx branch from b04c8a8 to f5bdc4f Compare April 5, 2025 15:33
@Byron Byron linked an issue Apr 6, 2025 that may be closed by this pull request
@Byron Byron enabled auto-merge April 6, 2025 04:55
@Byron Byron force-pushed the push-klrqpplwxrkx branch from 51ff766 to 6c27f3d Compare April 6, 2025 04:56
@Byron
Copy link
Member

Byron commented Apr 6, 2025

Thanks a lot.
I am merging this and will create a new patch release of gix-features shortly after.

@Byron Byron disabled auto-merge April 6, 2025 05:01
yuja and others added 2 commits April 6, 2025 13:01
…itoxideLabs#1928)

This follows up 7b1b5bf. Since packed-refs
appears to be sorted by full ref name, loose-refs should also be emitted in
that order.

The comparison function is copied from gix::diff::object::tree::EntryRef.
Non-utf8 file names are simply mapped to "" on Windows. We could add some
fallback, but callers can't handle such file names anyway.
- make sure we fallback to something *probably* better than the empty string.
@Byron Byron force-pushed the push-klrqpplwxrkx branch from 6c27f3d to 7e6e751 Compare April 6, 2025 05:03
@Byron Byron enabled auto-merge April 6, 2025 05:03
@Byron Byron merged commit 7502b4a into GitoxideLabs:main Apr 6, 2025
22 checks passed
@Byron
Copy link
Member

Byron commented Apr 6, 2025

And here it is: https://github.com/GitoxideLabs/gitoxide/releases/tag/gix-features-v0.41.1

@yuja yuja deleted the push-klrqpplwxrkx branch April 6, 2025 06:59
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.

repo.references() fails to deduplicate packed/loose refs
2 participants