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

lib/commit: (refactor) Clean up delta bare write API #1283

Closed

Conversation

cgwalters
Copy link
Member

The way _ostree_repo_open_content_bare() did both looking for the object and
possibly creating a new fd was just weird and inconsistent with e.g. the pull
code where we always call has_object() first.

Just call has_object() in the delta paths that used this too, making the
implementation right now a thin wrapper around
glnx_open_tmpfile_linkable_at(), but this is prep for a later patch which does
more.

The way `_ostree_repo_open_content_bare()` did both looking for the object and
possibly creating a new fd was just weird and inconsistent with e.g. the pull
code where we always call `has_object()` first.

Just call `has_object()` in the delta paths that used this too, making the
implementation right now a thin wrapper around
`glnx_open_tmpfile_linkable_at()`, but this is prep for a later patch which does
more.
Copy link
Member

@jlebon jlebon 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, just a minor nit!

@@ -412,23 +412,9 @@ _ostree_repo_open_content_bare (OstreeRepo *self,
const char *checksum,
Copy link
Member

Choose a reason for hiding this comment

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

Can we update the preceding comment block too?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep done ⬇️

@jlebon
Copy link
Member

jlebon commented Oct 18, 2017

@rh-atomic-bot r+ 3fbd2fd

@rh-atomic-bot
Copy link

⌛ Testing commit 3fbd2fd with merge a2f8315...

@rh-atomic-bot
Copy link

☀️ Test successful - status-atomicjenkins
Approved by: jlebon
Pushing a2f8315 to master...

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