Repository navigation
fix: select the basis under --whole-file as upstream does - #8325
Merged
Merged
Conversation
oferchen
force-pushed
the
fix/basis-selection-under-whole-file
branch
from
November 3, 2026 23:08
ac60aa9 to
522c85a
Compare
oferchen
changed the base branch from
perf/skip-pre-transfer-stat-under-perms
to
master
November 3, 2026 23:16
oferchen
force-pushed
the
fix/basis-selection-under-whole-file
branch
from
November 4, 2026 04:16
522c85a to
a1625fe
Compare
upstream generator.c chooses the basis before the whole_file branch: a --partial-dir file overrides the destination (:2270-2275), fuzzy and alt-dest bases are found for a missing destination (:2155, :2181), and only then does `if (read_batch || whole_file)` skip the block sums (:2280, :2400). ITEM_BASIS_TYPE_FOLLOWS and ITEM_XNAME_FOLLOWS still go on the wire (:2381-2386), and the receiver opens the named basis, so dest_mode() reads its stat (receiver.c:1158-1208). oc returned no basis under -W and checked the destination before the partial. The generator now names the basis under -W without a signature, and the receiver keeps and opens it; a transfer counts as a delta only when block sums were sent.
oferchen
force-pushed
the
fix/basis-selection-under-whole-file
branch
from
November 4, 2026 06:37
a1625fe to
6219632
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Under
--whole-file, and for an existing destination that also has a--partial-dirfile, the receiver now selects its basis the way 3.5.1's generator does.Upstream
recv_generator()picks the basis before it looks atwhole_file:--partial-dirfile overrides the destination (generator.c:2270-2275);--fuzzyand alt-dest bases are found for a missing destination (:2155, :2181);if (read_batch || whole_file)skip the block sums (:2280, :2400);ITEM_BASIS_TYPE_FOLLOWS/ITEM_XNAME_FOLLOWSstill go on the wire (:2381-2386);dest_mode()reads its stat (receiver.c:1158-1208).oc returned no basis at all under
-W, and it checked the destination before the partial. As a result, both the file's mode (without--perms) and the generator's request bytes differed from 3.5.1.Changes
receiver/basis.rs:try_partial_basis);whole_file_basisnames the partial, alt-dest or fuzzy basis without building a signature;statret == 0path.transfer_ops/request.rsandpipeline/pending.rs: a request with a named basis but no sums now keeps that basis (PendingTransfer::new_whole_file_against).is_delta_transfer()is now true only when sums were sent.Verification
-p:-Wand--protocol=28, now lands the same mode as 3.5.1;-Wpartial cells gave 755 / 640 against 3.5.1's 600.--checksum-seed=1, multiplex framing stripped:daemon_dest_mode_parityruns every cell with and without--whole-fileand adds "existing +--partial-dir";receiver/basis.rsandpipeline/pending.rs;EMPTYunder whole-file fails 2 tests;-Wcell with 0600 against 0640.Not in this PR
--compare-dest/--copy-dest/--link-deston an rsh push still land 755 against 3.5.1's 600, with and without-W. The oc rsh server never selects the alt-dir basis; that is task 546.