Add 'ostree reset' command to undo a bad commit
Accepts the following arguments: ref checksum Checks that the checksum is a parent of the ref before rewriting the ref. https://bugzilla.gnome.org/show_bug.cgi?id=705979
This commit is contained in:
1 parent
5a4b7d708f
commit
f9b2c45fc0
5 files changed
+148
-1
No files matched your search
+11
-1
@@ -19,7 +19,7 @@
|
||||
|
||||
set -e
|
||||
|
||||
echo "1..38"
|
||||
echo "1..39"
|
||||
|
||||
. $(dirname $0)/libtest.sh
|
||||
|
||||
@@ -265,3 +265,13 @@ assert_file_has_content log-output "commit $checksum1"
|
||||
assert_file_has_content log-output "Second commit"
|
||||
assert_file_has_content log-output "commit $checksum2"
|
||||
echo "ok log output"
|
||||
|
||||
cd ${test_tmpdir}
|
||||
checksum1=$($OSTREE commit -b test6 -s "First commit")
|
||||
checksum2=$($OSTREE commit -b test6 -s "Second commit")
|
||||
$OSTREE show test6 > show-output
|
||||
assert_file_has_content show-output "commit $checksum2"
|
||||
$OSTREE reset test6 $checksum1
|
||||
$OSTREE show test6 > show-output
|
||||
assert_file_has_content show-output "commit $checksum1"
|
||||
echo "ok basic reset"
|
||||
Reference in new issue
Block a user