add --patch-apply command

as an equivalent for `-d --patch-from`.
Requested by @sergeevabc in #2173.
This commit is contained in:
Yann Collet
2025-03-25 14:50:39 -07:00
parent 12ea5f6e30
commit eb168a0afc
2 changed files with 7 additions and 1 deletions
+4
View File
@@ -1777,11 +1777,15 @@ datagen -g1000 -P10 > tmp_patch
zstd --patch-from=tmp_dict tmp_patch -o tmp_patch_diff
zstd -d --patch-from=tmp_dict tmp_patch_diff -o tmp_patch_recon
$DIFF -s tmp_patch_recon tmp_patch
zstd -f --patch-apply=tmp_dict tmp_patch_diff -o tmp_patch_recon
$DIFF -s tmp_patch_recon tmp_patch
println "\n===> alternate syntax: patch-from origin"
zstd -f --patch-from tmp_dict tmp_patch -o tmp_patch_diff
zstd -df --patch-from tmp_dict tmp_patch_diff -o tmp_patch_recon
$DIFF -s tmp_patch_recon tmp_patch
zstd -f --patch-apply tmp_dict tmp_patch_diff -o tmp_patch_recon
$DIFF -s tmp_patch_recon tmp_patch
rm -rf tmp_*
println "\n===> patch-from recursive tests"