Skip to content

Commit

Permalink
Make xxh64 the "main_name" for the current xxhash.
Browse files Browse the repository at this point in the history
  • Loading branch information
WayneD committed May 24, 2020
1 parent 741d5f1 commit eda15d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions checksum.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ struct csum_struct {
const char *name, *main_name;
} valid_checksums[] = {
#ifdef SUPPORT_XXHASH
{ CSUM_XXH64, "xxhash", NULL },
{ CSUM_XXH64, "xxh64", NULL },
{ CSUM_XXH64, "xxhash", NULL },
#endif
{ CSUM_MD5, "md5", NULL },
{ CSUM_MD4, "md4", NULL },
Expand Down Expand Up @@ -270,7 +270,7 @@ void negotiate_checksum(int f_in, int f_out, const char *csum_list, int fail_if_
if (!cs || !saw[cs->num] || best <= saw[cs->num])
continue;
xfersum_type = checksum_type = cs->num;
negotiated_csum_name = cs->name;
negotiated_csum_name = cs->main_name ? cs->main_name : cs->name;
best = saw[cs->num];
if (best == 1)
break;
Expand Down
4 changes: 2 additions & 2 deletions rsync.yo
Original file line number Diff line number Diff line change
Expand Up @@ -1376,7 +1376,7 @@ and (assuming bf(--checksum) is specified) the pre-transfer checksums. If two
comma-separated names are supplied, the first name affects the transfer
checksums, and the second name affects the pre-transfer checksums (bf(-c)).

The algorithm choices are "auto", "xxhash", "MD5", "MD4", and "none".
The algorithm choices are "auto", "xxh64" (aka "xxhash"), "MD5", "MD4", and "none".

If "none" is specified for the first (or only) name, the bf(--whole-file) option
is forced on and no checksum verification is performed on the transferred data.
Expand All @@ -1389,7 +1389,7 @@ negotation between the client and the server as follows:
If both the client and the server are at least version 3.2.0, they will
exchange a list of checksum names and choose the first one in the list that
they have in common.
This typically means that they will choose xxhash if they both support it
This typically means that they will choose xxh64 if they both support it
and fall back to MD5.
If one side of the transfer is not new enough to support this checksum
negotation, then a value is chosen based on the protocol version (which
Expand Down

0 comments on commit eda15d5

Please sign in to comment.