[SCM] The rsync repository. - branch master updated

Rsync CVS commit messages rsync-cvs at lists.samba.org
Tue Jan 15 19:22:13 UTC 2019


The branch, master has been updated
       via  2ad1c4e8 Improve write-only --sender check & handle 2 new options.
       via  0da7ba57 Update option culling to handle latest changes.
      from  b3d12c5a Use a separate pass-by-value pointer for clarity.

https://git.samba.org/?p=rsync.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 2ad1c4e800d00244932b028c6c01e7d4090ce367
Author: Wayne Davison <wayned at samba.org>
Date:   Tue Jan 15 11:18:36 2019 -0800

    Improve write-only --sender check & handle 2 new options.

commit 0da7ba57b5bee15deefa12a760ec310152e01919
Author: Wayne Davison <wayned at samba.org>
Date:   Tue Jan 15 11:16:50 2019 -0800

    Update option culling to handle latest changes.

-----------------------------------------------------------------------

Summary of changes:
 packaging/cull_options | 7 ++++---
 support/rrsync         | 5 +++--
 2 files changed, 7 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/packaging/cull_options b/packaging/cull_options
index 388d33f0..91e64e76 100755
--- a/packaging/cull_options
+++ b/packaging/cull_options
@@ -5,7 +5,7 @@
 use strict;
 
 our %short_no_arg;
-our %short_with_num;
+our %short_with_num = ( '@' => 1 );
 our %long_opt = ( # These include some extra long-args that BackupPC uses:
     'block-size' => 1,
     'daemon' => -1,
@@ -45,7 +45,7 @@ while (<IN>) {
     } elsif (/dest_option = "--([^"]+)"/) {
 	$long_opt{$1} = 2;
 	undef $last_long_opt;
-    } elsif (/\Qasprintf(\E[^,]+, "--([^"=]+)=/ || /\Qargs[ac++]\E = "--([^"=]+)=/) {
+    } elsif (/\Qasprintf(\E[^,]+, "--([^"=]+)=/ || /\Qargs[ac++]\E = "--([^"=]+)=/ || /fmt = .*: "--([^"=]+)=/) {
 	$long_opt{$1} = 1;
 	undef $last_long_opt;
     }
@@ -76,7 +76,8 @@ foreach my $opt (sort keys %long_opt) {
     my $val = $long_opt{$opt};
     $val = 1 if $opt =~ /^(max-|min-)/;
     $val = 3 if $opt eq 'files-from';
-    $val = '$ro ? -1 : ' . $val if $opt =~ /^remove-/;
+    $val = q"$only eq 'r' ? -1 : " . $val if $opt =~ /^(remove-|log-file)/;
+    $val = q"$only eq 'w' ? -1 : " . $val if $opt eq 'sender';
     print "  '$opt' => $val,\n";
 }
 
diff --git a/support/rrsync b/support/rrsync
index ad4d434b..3bbca2e0 100644
--- a/support/rrsync
+++ b/support/rrsync
@@ -63,7 +63,7 @@ die "$0 reading from write-only server not allowed\n" if $only eq 'w' && $am_sen
 our $short_disabled = 's';
 
 our $short_no_arg = 'ACDEHIJKLORSWXbcdgklmnoprstuvxyz'; # DO NOT REMOVE ANY
-our $short_with_num = 'B'; # DO NOT REMOVE ANY
+our $short_with_num = '@B'; # DO NOT REMOVE ANY
 
 # To disable a long-named option, change its value to a -1.  The values mean:
 # 0 = the option has no arg; 1 = the arg doesn't need any checking; 2 = only
@@ -73,6 +73,7 @@ our %long_opt = (
   'backup-dir' => 2,
   'block-size' => 1,
   'bwlimit' => 1,
+  'checksum-choice' => 1,
   'checksum-seed' => 1,
   'compare-dest' => 2,
   'compress-level' => 1,
@@ -130,7 +131,7 @@ our %long_opt = (
   'remove-sent-files' => $only eq 'r' ? -1 : 0,
   'remove-source-files' => $only eq 'r' ? -1 : 0,
   'safe-links' => 0,
-  'sender' => 0,
+  'sender' => $only eq 'w' ? -1 : 0,
   'server' => 0,
   'size-only' => 0,
   'skip-compress' => 1,


-- 
The rsync repository.



More information about the rsync-cvs mailing list