[SCM] The rsync repository. - branch master updated

Rsync CVS commit messages rsync-cvs at lists.samba.org
Wed Sep 14 15:23:54 UTC 2022


The branch, master has been updated
       via  7a2dbf71 Make the implied-arg adding for --relative more efficient.
       via  8449539a More NEWS updates.
      from  71c2b5d0 Fix exclusion of /. with --relative.

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


- Log -----------------------------------------------------------------
commit 7a2dbf717794655a3fd82439fdb1e3d8b4730c74
Author: Wayne Davison <wayne at opencoder.net>
Date:   Wed Sep 14 08:20:41 2022 -0700

    Make the implied-arg adding for --relative more efficient.

commit 8449539a0f4501ffc7a1792e361925ee98b86783
Author: Wayne Davison <wayne at opencoder.net>
Date:   Wed Sep 14 07:53:23 2022 -0700

    More NEWS updates.

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

Summary of changes:
 NEWS.md   | 25 ++++++++++++++-----------
 exclude.c | 45 +++++++++++++++++++++++++--------------------
 2 files changed, 39 insertions(+), 31 deletions(-)


Changeset truncated at 500 lines:

diff --git a/NEWS.md b/NEWS.md
index 49dbc544..d40b7fa2 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -4,9 +4,9 @@
 
 ### BUG FIXES:
 
-- Fix a bug with validating remote filter rules.
+- Fixed the validating of remote filter rules.
 
-- When rsync gets and unpack error on an ACL, mention the filename.
+- When rsync gets an unpack error on an ACL, mention the filename.
 
 ### ENHANCEMENTS:
 
@@ -17,7 +17,10 @@
 - Added support for SHA1, SHA256, and SHA512 digests in file checksums.  While
   this tends to be overkill, it is available if someone really needs it.  These
   overly-long checksums are at the lowest priority in the normal checksum
-  negotation list.
+  negotiation list.
+
+- Improved the xattr hash table to use a 64-bit key (which should ensure fewer
+  collisions).
 
 - If the `--version` option is repeated (e.g. `-VV`) then the information is
   output in a (still human-readable) JSON format (client side only).
@@ -26,8 +29,8 @@
   version output from any rsync.  The script accepts either text on stdin
   **or** an arg that specifies an rsync executable to run with a doubled
   `--version` option.  If the text we get isn't already in JSON format, it is
-  converted into equivalent JSON as rsync 3.2.7 would output it (though some
-  info may be missing from older versions).
+  converted. Newer rsync versions will provide more complete info than older
+  versions.
 
 ### PACKAGING RELATED:
 
@@ -39,12 +42,12 @@
   talking to an rsync prior to 3.0.0) or you can configure rsync to tell
   openssl to enable legacy algorithms (see below).
 
-- A simple openssl config file is supplied that can be optionally installed for
-  rsync to use.  If you install packaging/openssl-rsync.cnf to a public spot
-  (such as ` /etc/ssl/openssl-rsync.cnf` or similar) and then configure rsync
-  using `--with-openssl-conf=/path/name.cnf`, this will cause rsync to export
-  the configured path in the OPENSSL_CONF environment variable (when it is not
-  already set).  This will enable openssl's MD4 code for rsync to use.
+- A simple openssl config file is supplied that can be installed for rsync to
+  use.  If you install packaging/openssl-rsync.cnf to a public spot (such as
+  `/etc/ssl/openssl-rsync.cnf`) and then run configure with the option
+  `--with-openssl-conf=/path/name.cnf`, this will cause rsync to export the
+  configured path in the OPENSSL_CONF environment variable (when the variable
+  is not already set).  This will enable openssl's MD4 code for rsync to use.
 
 ------------------------------------------------------------------------------
 
diff --git a/exclude.c b/exclude.c
index b21207ba..5c0b0a69 100644
--- a/exclude.c
+++ b/exclude.c
@@ -493,9 +493,10 @@ void add_implied_include(const char *arg, int skip_daemon_module)
 			if (saw_live_open_brkt)
 				maybe_add_literal_brackets_rule(rule, arg_len);
 			if (relative_paths && slash_cnt) {
-				filter_rule const *ent;
-				slash_cnt = 1;
-				for (p = new_pat + 1; (p = strchr(p, '/')) != NULL; p++) {
+				int sub_slash_cnt = slash_cnt;
+				while ((p = strrchr(new_pat, '/')) != NULL && p != new_pat) {
+					filter_rule const *ent;
+					filter_rule *R_rule;
 					int found = 0;
 					*p = '\0';
 					for (ent = implied_filter_list.head; ent; ent = ent->next) {
@@ -504,25 +505,29 @@ void add_implied_include(const char *arg, int skip_daemon_module)
 							break;
 						}
 					}
-					if (!found) {
-						filter_rule *R_rule = new0(filter_rule);
-						R_rule->rflags = FILTRULE_INCLUDE | FILTRULE_DIRECTORY;
-						/* Check if our sub-path has wildcards or escaped backslashes */
-						if (saw_wild && strpbrk(new_pat, "*[?\\"))
-							R_rule->rflags |= FILTRULE_WILD;
-						R_rule->pattern = strdup(new_pat);
-						R_rule->u.slash_cnt = slash_cnt;
-						R_rule->next = implied_filter_list.head;
-						implied_filter_list.head = R_rule;
-						if (DEBUG_GTE(FILTER, 3)) {
-							rprintf(FINFO, "[%s] add_implied_include(%s/)\n",
-								who_am_i(), R_rule->pattern);
-						}
-						if (saw_live_open_brkt)
-							maybe_add_literal_brackets_rule(R_rule, -1);
+					if (found) {
+						*p = '/';
+						break; /* We added all parent dirs already */
+					}
+					R_rule = new0(filter_rule);
+					R_rule->rflags = FILTRULE_INCLUDE | FILTRULE_DIRECTORY;
+					/* Check if our sub-path has wildcards or escaped backslashes */
+					if (saw_wild && strpbrk(new_pat, "*[?\\"))
+						R_rule->rflags |= FILTRULE_WILD;
+					R_rule->pattern = strdup(new_pat);
+					R_rule->u.slash_cnt = --sub_slash_cnt;
+					R_rule->next = implied_filter_list.head;
+					implied_filter_list.head = R_rule;
+					if (DEBUG_GTE(FILTER, 3)) {
+						rprintf(FINFO, "[%s] add_implied_include(%s/)\n",
+							who_am_i(), R_rule->pattern);
 					}
+					if (saw_live_open_brkt)
+						maybe_add_literal_brackets_rule(R_rule, -1);
+				}
+				for (p = new_pat; sub_slash_cnt < slash_cnt; sub_slash_cnt++) {
+					p += strlen(p);
 					*p = '/';
-					slash_cnt++;
 				}
 			}
 		}


-- 
The rsync repository.



More information about the rsync-cvs mailing list