Repository navigation
feat(protocol): implement incremental recursion file list exchange - #2551
Merged
Merged
Conversation
Add INC_RECURSE support for protocol 32 segmented file list sending. When negotiated, the sender partitions the file list into per-directory segments sent in depth-first order with NDX_FLIST_OFFSET framing, and the receiver reconstructs the complete list before the transfer loop. - Add FileListSegment and SegmentedFileList data structures - Add DirectoryTree for depth-first directory traversal - Enable 'i' capability flag in daemon handshake - Partition and reorder file list for contiguous NDX ranges - Send sub-lists with NDX_FLIST_OFFSET framing + NDX_FLIST_EOF - Receive and append sub-list entries on receiver side - Compute allow_inc_recurse matching upstream compat.c:161-179
oferchen
added a commit
that referenced
this pull request
May 1, 2026
…2551) Add INC_RECURSE support for protocol 32 segmented file list sending. When negotiated, the sender partitions the file list into per-directory segments sent in depth-first order with NDX_FLIST_OFFSET framing, and the receiver reconstructs the complete list before the transfer loop. - Add FileListSegment and SegmentedFileList data structures - Add DirectoryTree for depth-first directory traversal - Enable 'i' capability flag in daemon handshake - Partition and reorder file list for contiguous NDX ranges - Send sub-lists with NDX_FLIST_OFFSET framing + NDX_FLIST_EOF - Receive and append sub-list entries on receiver side - Compute allow_inc_recurse matching upstream compat.c:161-179
oferchen
added a commit
that referenced
this pull request
May 5, 2026
…2551) Add INC_RECURSE support for protocol 32 segmented file list sending. When negotiated, the sender partitions the file list into per-directory segments sent in depth-first order with NDX_FLIST_OFFSET framing, and the receiver reconstructs the complete list before the transfer loop. - Add FileListSegment and SegmentedFileList data structures - Add DirectoryTree for depth-first directory traversal - Enable 'i' capability flag in daemon handshake - Partition and reorder file list for contiguous NDX ranges - Send sub-lists with NDX_FLIST_OFFSET framing + NDX_FLIST_EOF - Receive and append sub-list entries on receiver side - Compute allow_inc_recurse matching upstream compat.c:161-179
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
NDX_FLIST_OFFSETframing, terminated byNDX_FLIST_EOFChanges
New files
crates/protocol/src/flist/segment.rs—FileListSegmentandSegmentedFileListdata structures with NDX lookupcrates/protocol/src/flist/dir_tree.rs—DirectoryTreefor depth-first directory traversal (mirrors upstreamadd_dirs_to_tree())Modified files
crates/protocol/src/flist/mod.rs— re-export new modulescrates/core/src/client/remote/daemon_transfer.rs— enablei(INC_RECURSE) in capability string-e.iLsfxCIvucrates/transfer/src/lib.rs— computeallow_inc_recursematching upstreamcompat.c:161-179crates/transfer/src/generator.rs— partition file list, send sub-lists withNDX_FLIST_OFFSETframing,PendingSegmentreferences file_list by rangecrates/transfer/src/receiver.rs—receive_extra_file_lists()reads sub-lists and appends to file_listcrates/transfer/src/setup.rs— addallow_inc_recursetoProtocolSetupConfigDesign decisions
(flist_start, count)rather than cloning, avoiding double allocation.Upstream Reference
flist.c:add_dirs_to_tree(),flist.c:send_extra_file_list(),flist.c:recv_file_list()compat.c:161-179 set_allow_inc_recurse()io.c:read_ndx_and_attrs()— NDX_FLIST_OFFSET detectionTest plan
cargo fmt --all -- --check— cleancargo clippy --workspace --all-targets --all-features --no-deps -- -D warnings— cleancargo nextest run -p transfer -p protocol --all-features— 5566 tests passcargo nextest run --workspace --all-features— all pass (except pre-existing flakyprogress_reports_intermediate_updates)