ot-builtin-commit.c: add --skip-list option
This was already supported by the commit modifier API, just needed to expose it. This will also be used to test the libarchive API in a future test. Closes: #275 Approved by: cgwalters
This commit is contained in:
1 parent
b1d3dd151c
commit
b717fd2c18
5 files changed
+131
-86
No files matched your search
+22
-4
@@ -19,7 +19,7 @@
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
echo "1..54"
|
||||
echo "1..55"
|
||||
|
||||
$OSTREE checkout test2 checkout-test2
|
||||
echo "ok checkout"
|
||||
@@ -179,13 +179,31 @@ cd ${test_tmpdir}/checkout-test2-4
|
||||
$OSTREE commit -b test2 -s "no xattrs" --no-xattrs
|
||||
echo "ok commit with no xattrs"
|
||||
|
||||
# NB: The + is optional, but we need to make sure we support it
|
||||
cd ${test_tmpdir}
|
||||
cat > test-statoverride.txt <<EOF
|
||||
+2048 /a/nested/3
|
||||
+1048 /a/nested/2
|
||||
2048 /a/nested/3
|
||||
EOF
|
||||
cd ${test_tmpdir}/checkout-test2-4
|
||||
$OSTREE commit -b test2 -s "with statoverride" --statoverride=../test-statoverride.txt
|
||||
echo "ok commit statoverridde"
|
||||
$OSTREE commit -b test2-override -s "with statoverride" --statoverride=../test-statoverride.txt
|
||||
cd ${test_tmpdir}
|
||||
$OSTREE checkout test2-override checkout-test2-override
|
||||
test -g checkout-test2-override/a/nested/2
|
||||
test -u checkout-test2-override/a/nested/3
|
||||
echo "ok commit statoverride"
|
||||
|
||||
cd ${test_tmpdir}
|
||||
cat > test-skiplist.txt <<EOF
|
||||
/a/nested/3
|
||||
EOF
|
||||
cd ${test_tmpdir}/checkout-test2-4
|
||||
assert_has_file a/nested/3
|
||||
$OSTREE commit -b test2-skiplist -s "with skiplist" --skip-list=../test-skiplist.txt
|
||||
cd ${test_tmpdir}
|
||||
$OSTREE checkout test2-skiplist checkout-test2-skiplist
|
||||
assert_not_has_file checkout-test2-skiplist/a/nested/3
|
||||
echo "ok commit skiplist"
|
||||
|
||||
cd ${test_tmpdir}
|
||||
$OSTREE prune
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2013 Colin Walters <walters@verbum.org>
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the
|
||||
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
# Boston, MA 02111-1307, USA.
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
echo "1..1"
|
||||
|
||||
. $(dirname $0)/libtest.sh
|
||||
|
||||
setup_test_repository "bare"
|
||||
|
||||
cd ${test_tmpdir}
|
||||
cat > test-statoverride.txt <<EOF
|
||||
+2048 /abinary
|
||||
EOF
|
||||
$OSTREE checkout test2 test2-checkout
|
||||
touch test2-checkout/abinary
|
||||
chmod a+x test2-checkout/abinary
|
||||
(cd test2-checkout && $OSTREE commit -b test2 -s "with statoverride" --statoverride=../test-statoverride.txt)
|
||||
rm -rf test2-checkout
|
||||
$OSTREE checkout test2 test2-checkout
|
||||
test -u test2-checkout/abinary
|
||||
|
||||
echo "ok"
|
||||
Reference in new issue
Block a user