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 0b795785dd).
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>
This commit is contained in:
1 parent
048c27588a
commit
76c5cc07db
3 files changed
+27
-7
No files matched your search
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user