core: Allow specifying a previous commit tree as a basis for a new commit

It's pretty trivial to map a previously existing commit tree into a
mutable tree too.  While we're here change the command line arguments
for commit so that we can now properly overlay any combination of
directory, commit, or tarfile.
This commit is contained in:
Colin Walters committed 2011-12-21 20:10:10 -05:00
1 parent c8377c7c5c
commit add55849ab
6 files changed
+146 -61

No files matched your search

+4 -1
View File
@@ -19,7 +19,7 @@
set -e
echo "1..18"
echo "1..19"
. libtest.sh
@@ -151,3 +151,6 @@ echo "ok local clone checkout"
$OSTREE checkout -U test2 checkout-user-test2
echo "ok user checkout"
$OSTREE commit -b test2 -s "Another commit" --tree=ref=test2
echo "ok commit from ref"
+3 -3
View File
@@ -39,7 +39,7 @@ echo not > subdir/2/notempty
tar -c -z -f ../foo.tar.gz .
cd ..
$OSTREE commit -s "from tar" -b test-tar --tar foo.tar.gz
$OSTREE commit -s "from tar" -b test-tar --tree=tar=foo.tar.gz
echo "ok tar commit"
cd ${test_tmpdir}
@@ -62,7 +62,7 @@ echo foo1 > foo
ln foo bar
tar czf ${test_tmpdir}/hardlinktest.tar.gz .
cd ${test_tmpdir}
$OSTREE commit -s 'hardlinks' -b test-hardlinks --tar hardlinktest.tar.gz
$OSTREE commit -s 'hardlinks' -b test-hardlinks --tree=tar=hardlinktest.tar.gz
rm -rf hardlinktest
echo "ok hardlink commit"
@@ -89,7 +89,7 @@ echo "new" > files2/subdir/new
tar -c -C files1 -z -f files1.tar.gz .
tar -c -C files2 -z -f files2.tar.gz .
$OSTREE commit -s 'multi tar' -b multicommit --tar files1.tar.gz files2.tar.gz
$OSTREE commit -s 'multi tar' -b multicommit --tree=tar=files1.tar.gz --tree=tar=files2.tar.gz
echo "ok tar multicommit"
cd ${test_tmpdir}