core: Add --skip-if-unchanged option for commit

There's not much point for OS builds to have "empty" commits.
This commit is contained in:
Colin Walters committed 2011-12-22 18:47:30 -05:00
1 parent d8ea31e24e
commit dab4611263
4 files changed
+90 -10

No files matched your search

+7 -1
View File
@@ -19,7 +19,7 @@
set -e
echo "1..20"
echo "1..21"
. libtest.sh
@@ -158,3 +158,9 @@ echo "ok commit from ref"
$OSTREE commit -b trees/test2 -s 'ref with / in it' --tree=ref=test2
echo "ok commit ref with /"
old_rev=$($OSTREE rev-parse test2)
$OSTREE commit --skip-if-unchanged -b test2 -s 'should not be committed' --tree=ref=test2
new_rev=$($OSTREE rev-parse test2)
assert_streq "${old_rev}" "${new_rev}"
echo "ok commit --skip-if-unchanged"