summaryrefslogtreecommitdiff
path: root/src/libostree/ostree-core.h
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2015-10-28 10:07:51 +0100
committerGiuseppe Scrivano <gscrivan@redhat.com>2015-11-03 09:53:38 +0100
commit76c5cc07db1a8ac4bd37ecc5f50c84ac4b42e886 (patch)
tree438f0bd9aac9109eb7f81d6e63a0ee9925b2a88c /src/libostree/ostree-core.h
parent048c27588abec700fa3ffa9edc2914f4600d2696 (diff)
downloadostree-76c5cc07db1a8ac4bd37ecc5f50c84ac4b42e886.tar.gz
pull: add support for tombstone commits
Add a new object type: OSTREE_OBJECT_TYPE_TOMBSTONE_COMMIT that is used when a commit was intentionally removed. If the remote repository doesn't use tombstone commits, do not fail on a missing commit (change 0b795785dd81cd1e8c2c5960f0959740bce72a51). When the remote repository uses tombstones, if a commit cannot be found, check if the tombstone file is present and fail if it is not present. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'src/libostree/ostree-core.h')
-rw-r--r--src/libostree/ostree-core.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/libostree/ostree-core.h b/src/libostree/ostree-core.h
index 711c6994..637f8172 100644
--- a/src/libostree/ostree-core.h
+++ b/src/libostree/ostree-core.h
@@ -56,15 +56,17 @@ G_BEGIN_DECLS
* @OSTREE_OBJECT_TYPE_DIR_TREE: List of children (trees or files), and metadata
* @OSTREE_OBJECT_TYPE_DIR_META: Directory metadata
* @OSTREE_OBJECT_TYPE_COMMIT: Toplevel object, refers to tree and dirmeta for root
+ * @OSTREE_OBJECT_TYPE_COMMIT_TOMBSTONE: Toplevel object, refers to a deleted commit
*
* Enumeration for core object types; %OSTREE_OBJECT_TYPE_FILE is for
* content, the other types are metadata.
*/
typedef enum {
- OSTREE_OBJECT_TYPE_FILE = 1, /* .file */
- OSTREE_OBJECT_TYPE_DIR_TREE = 2, /* .dirtree */
- OSTREE_OBJECT_TYPE_DIR_META = 3, /* .dirmeta */
- OSTREE_OBJECT_TYPE_COMMIT = 4 /* .commit */
+ OSTREE_OBJECT_TYPE_FILE = 1, /* .file */
+ OSTREE_OBJECT_TYPE_DIR_TREE = 2, /* .dirtree */
+ OSTREE_OBJECT_TYPE_DIR_META = 3, /* .dirmeta */
+ OSTREE_OBJECT_TYPE_COMMIT = 4, /* .commit */
+ OSTREE_OBJECT_TYPE_TOMBSTONE_COMMIT = 5, /* .commit-tombstone */
} OstreeObjectType;
/**
@@ -73,14 +75,14 @@ typedef enum {
*
* Returns: %TRUE if object type is metadata
*/
-#define OSTREE_OBJECT_TYPE_IS_META(t) (t >= 2 && t <= 4)
+#define OSTREE_OBJECT_TYPE_IS_META(t) (t >= 2 && t <= 5)
/**
* OSTREE_OBJECT_TYPE_LAST:
*
* Last valid object type; use this to validate ranges.
*/
-#define OSTREE_OBJECT_TYPE_LAST OSTREE_OBJECT_TYPE_COMMIT
+#define OSTREE_OBJECT_TYPE_LAST OSTREE_OBJECT_TYPE_TOMBSTONE_COMMIT
/**
* OSTREE_DIRMETA_GVARIANT_FORMAT: