Add _ostree_repo_mode_is_bare helper

This cleans up some existing code, but it also allows us to later
add new bare modes.

Closes: #750
Approved by: cgwalters
This commit is contained in:
Alexander Larsson authored and Atomic Bot committed 2017-03-27 13:48:41 +00:00
1 parent 455cc5e892
commit 612150f143
4 files changed
+13 -7

No files matched your search

+1 -1
View File
@@ -363,7 +363,7 @@ checkout_file_hardlink (OstreeRepo *self,
GError **error)
{
HardlinkResult ret_result = HARDLINK_RESULT_NOT_SUPPORTED;
int srcfd = (self->mode == OSTREE_REPO_MODE_BARE || self->mode == OSTREE_REPO_MODE_BARE_USER) ?
int srcfd = _ostree_repo_mode_is_bare (self->mode) ?
self->objects_dir_fd : self->uncompressed_objects_dir_fd;
again: