lib/commit: disallow writing content in 'bare-split-xattrs' mode
This prevents writing content into 'bare-split-xattrs` repository, while carving some space for experimenting via a temporary `OSTREE_EXP_WRITE_BARE_SPLIT_XATTRS` environment flag.
This commit is contained in:
2 files changed
+25
No files matched your search
@@ -22,4 +22,26 @@ ${OSTREE} fsck --all
|
||||
tap_ok "repo fsck"
|
||||
rm -rf -- repo
|
||||
|
||||
cd ${test_tmpdir}
|
||||
mkdir -p "${test_tmpdir}/files"
|
||||
touch files/foo
|
||||
${OSTREE} init --mode "${mode}"
|
||||
if ${OSTREE} commit --orphan -m "not implemented" files; then
|
||||
assert_not_reached "commit to bare-split-xattrs should have failed"
|
||||
fi
|
||||
${OSTREE} fsck --all
|
||||
tap_ok "commit not implemented"
|
||||
rm -rf -- repo files
|
||||
|
||||
cd ${test_tmpdir}
|
||||
mkdir -p "${test_tmpdir}/files"
|
||||
touch files/foo
|
||||
${OSTREE} init --mode "${mode}"
|
||||
OSTREE_EXP_WRITE_BARE_SPLIT_XATTRS=true ${OSTREE} commit --orphan -m "experimental" files
|
||||
if ${OSTREE} fsck --all; then
|
||||
assert_not_reached "fsck should have failed"
|
||||
fi
|
||||
tap_ok "commit exp override"
|
||||
rm -rf -- repo files
|
||||
|
||||
tap_end
|
||||
Reference in new issue
Block a user