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

disk: tweak ensure{Btrfs,LVM}() to be more linear #1073

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

mvo5
Copy link
Contributor

@mvo5 mvo5 commented Nov 28, 2024

Tiny drive-by commit to make ensure{Btrfs,LVM}() more linear to read. I.e. avoid nested if/else when returning and do error checks early.

Best viewed side-by-side as the diff makes it hard to follow.

[edit: moved to draft as I have not inspected how much testing this function has, I'm pretty confident in the change but would really like to double check the test situation as well]
[edit2: played around a bit more with the tests and it seems it's well covered so moving out of draft again]

@mvo5 mvo5 marked this pull request as draft November 28, 2024 08:58
achilleas-k
achilleas-k previously approved these changes Nov 28, 2024
Copy link
Member

@achilleas-k achilleas-k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤏 tiny nitpick

pkg/disk/partition_table.go Outdated Show resolved Hide resolved
@mvo5 mvo5 marked this pull request as ready for review November 28, 2024 17:47
Copy link

This PR is stale because it has been open 30 days with no activity. Remove "Stale" label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Dec 30, 2024
Copy link

github-actions bot commented Jan 6, 2025

This PR was closed because it has been stalled for 30+7 days with no activity.

@github-actions github-actions bot closed this Jan 6, 2025
@mvo5 mvo5 reopened this Jan 6, 2025
Tiny drive-by commit to make `ensure{Btrfs,LVM}()` more linear to read.
I.e. avoid nested if/else when returning and do error checks early.
@mvo5
Copy link
Contributor Author

mvo5 commented Jan 6, 2025

Had to rebase to fix conflicts, sorry

@mvo5 mvo5 requested a review from achilleas-k January 6, 2025 08:24
@mvo5 mvo5 removed the Stale label Jan 6, 2025
Copy link
Contributor

@bcl bcl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@mvo5 mvo5 added this pull request to the merge queue Jan 7, 2025
Merged via the queue into osbuild:main with commit 7faaf55 Jan 7, 2025
18 checks passed
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.

3 participants