prune: Error if --static-deltas-only without --delete-commit
The original changes here apparently had the *idea* that `--static-deltas-only` would be useful in general, but we never implemented that. The current situation where it's ignored unless `--delete-commit` is specified is very misleading and I can easily see it leading to data loss for people. Let's error out until we have a chance to make it actually useful. Related: https://github.com/ostreedev/ostree/issues/1479 Closes: #1482 Approved by: giuseppe
This commit is contained in:
1 parent
733c0498dc
commit
79d6f635df
2 files changed
+13
-3
No files matched your search
+4
-3
@@ -141,9 +141,10 @@ assert_file_has_content deltascount "^1$"
|
||||
${CMD_PREFIX} ostree --repo=repo static-delta generate test
|
||||
${CMD_PREFIX} ostree --repo=repo static-delta list | wc -l > deltascount
|
||||
assert_file_has_content deltascount "^2$"
|
||||
${CMD_PREFIX} ostree --repo=repo prune --static-deltas-only --keep-younger-than="October 20 2015"
|
||||
${CMD_PREFIX} ostree --repo=repo static-delta list | wc -l > deltascount
|
||||
assert_file_has_content deltascount "^1$"
|
||||
if ${CMD_PREFIX} ostree --repo=repo prune --static-deltas-only --keep-younger-than="October 20 2015" 2>err.txt; then
|
||||
fatal "pruned deltas only"
|
||||
fi
|
||||
assert_file_has_content_literal err.txt "--static-deltas-only requires --delete-commit"
|
||||
|
||||
echo "ok prune"
|
||||
|
||||
|
||||
Reference in new issue
Block a user