Skip to content

refactor(sync): DRY do_sync_with function#12033

Merged
cakebaker merged 1 commit into
uutils:mainfrom
hlsxx:sync-dry-sync-with
Apr 27, 2026
Merged

refactor(sync): DRY do_sync_with function#12033
cakebaker merged 1 commit into
uutils:mainfrom
hlsxx:sync-dry-sync-with

Conversation

@hlsxx
Copy link
Copy Markdown
Contributor

@hlsxx hlsxx commented Apr 27, 2026

DRY: Refactor do_syncfs and do_fdatasync into a shared do_sync_with.

Both functions shared the same open-and-operate loop, differing only in the sync operation called. This change extracts that loop into a generic do_sync_with<F> and reduces each caller to a one-liner.

@github-actions
Copy link
Copy Markdown

GNU testsuite comparison:

Skipping an intermittent issue tests/date/date-locale-hour (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/basenc/bounded-memory is now passing!
Congrats! The gnu test tests/seq/seq-epipe is now passing!

@cakebaker cakebaker merged commit 35d0a1e into uutils:main Apr 27, 2026
169 checks passed
@cakebaker
Copy link
Copy Markdown
Contributor

Nice refactoring, thanks!

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.

2 participants