repo: Add OSTREE_REPO_TEST_ERROR=pre-commit env var
Setting this causes commit to error out. There are other ways we could do this in a more sophisticated fashion, such as via SystemTap etc. But this has low-tech applicablity, works as non-root. The reason I'm adding this is so that we can add test cases for cleanup of the `tmp/staging-` directory. Closes: #170 Approved by: jlebon
This commit is contained in:
1 parent
3111248373
commit
15b3cab65e
4 files changed
+29
-1
No files matched your search
@@ -36,6 +36,10 @@ G_BEGIN_DECLS
|
||||
#define _OSTREE_SUMMARY_CACHE_DIR "summaries"
|
||||
#define _OSTREE_CACHE_DIR "cache"
|
||||
|
||||
typedef enum {
|
||||
OSTREE_REPO_TEST_ERROR_PRE_COMMIT = (1 << 0)
|
||||
} OstreeRepoTestErrorFlags;
|
||||
|
||||
/**
|
||||
* OstreeRepo:
|
||||
*
|
||||
@@ -86,6 +90,8 @@ struct OstreeRepo {
|
||||
uid_t target_owner_uid;
|
||||
gid_t target_owner_gid;
|
||||
|
||||
guint test_error_flags; /* OstreeRepoTestErrorFlags */
|
||||
|
||||
GKeyFile *config;
|
||||
GHashTable *remotes;
|
||||
GMutex remotes_lock;
|
||||
|
||||
Reference in new issue
Block a user