diff: Add ostree_diff_dirs_with_options(), expose via cmdline
The first options are owner_uid/owner_gid, which makes it possible to use diff on local files where --owner-uid/gid have been passed to commit. Closes: #740 Approved by: cgwalters
This commit is contained in:
1 parent
5d413dff88
commit
e665e51408
7 files changed
+119
-5
No files matched your search
+16
-1
@@ -19,7 +19,7 @@
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
echo "1..63"
|
||||
echo "1..65"
|
||||
|
||||
$CMD_PREFIX ostree --version > version.yaml
|
||||
python -c 'import yaml; yaml.safe_load(open("version.yaml"))'
|
||||
@@ -171,6 +171,21 @@ cd ${test_tmpdir}
|
||||
assert_file_has_content diff-test2-2 'A *oh-look-a-file$'
|
||||
echo "ok diff cwd"
|
||||
|
||||
cd ${test_tmpdir}/checkout-test2-4
|
||||
$OSTREE diff test2 ./ > ${test_tmpdir}/diff-test2
|
||||
assert_file_empty ${test_tmpdir}/diff-test2
|
||||
$OSTREE diff test2 --owner-uid=$((`id -u`+1)) ./ > ${test_tmpdir}/diff-test2
|
||||
assert_file_has_content ${test_tmpdir}/diff-test2 'M */yet$'
|
||||
assert_file_has_content ${test_tmpdir}/diff-test2 'M */yet/message$'
|
||||
assert_file_has_content ${test_tmpdir}/diff-test2 'M */yet/another/tree/green$'
|
||||
echo "ok diff file with different uid"
|
||||
|
||||
$OSTREE diff test2 --owner-gid=$((`id -g`+1)) ./ > ${test_tmpdir}/diff-test2
|
||||
assert_file_has_content ${test_tmpdir}/diff-test2 'M */yet$'
|
||||
assert_file_has_content ${test_tmpdir}/diff-test2 'M */yet/message$'
|
||||
assert_file_has_content ${test_tmpdir}/diff-test2 'M */yet/another/tree/green$'
|
||||
echo "ok diff file with different gid"
|
||||
|
||||
cd ${test_tmpdir}/checkout-test2-4
|
||||
rm four
|
||||
mkdir four
|
||||
|
||||
Reference in new issue
Block a user