Skip to content

fix: correct --files-from operand assembly and implied --relative handling - #2859

Merged
oferchen merged 2 commits into
masterfrom
fix/files-from-operand-assembly
Mar 21, 2026
Merged

oferchen merged 2 commits into
masterfrom
fix/files-from-operand-assembly

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • When --files-from is active, the source directory now serves only as a base for resolving file list entries, not as a separate transfer operand
  • File list entries are joined with a ./ marker (e.g., /src/./file.txt) so the engine's relative_root() strips the base prefix correctly
  • Fixes the pre-existing CI failure in files_from integration tests introduced by PR fix: apply upstream option interactions when --files-from is active #2762

Upstream Reference

  • options.c:2187-2188 - --files-from implies --relative
  • main.c:780-790 - source dir is chdir target, not a transfer source

Test plan

  • Updated files_from_integration_with_recursive_copies_nested_files expectations to match upstream --relative behavior
  • Added 6 new unit tests for files_from_active=true path in resolve_file_list_entries
  • All existing resolve_file_list_entries tests updated to pass new parameter
  • CI nextest pass (should unblock all other PRs)

…dling

When --files-from is active, the source directory should serve only as
a base for resolving file list entries, not appear as a separate transfer
operand. This caused duplicate source paths and incorrect file placement.

Additionally, --files-from implies --relative (upstream options.c:2187),
so file list entries are now joined with a ./ marker (e.g., /src/./file.txt)
enabling the engine's relative_root() to strip the base prefix correctly.

upstream: main.c:780-790 - source dir is chdir target, not transfer source
@github-actions github-actions Bot added the bug Something isn't working label Mar 21, 2026
@oferchen
oferchen merged commit f0a1592 into master Mar 21, 2026
15 of 31 checks passed
@oferchen
oferchen deleted the fix/files-from-operand-assembly branch March 21, 2026 19:00
oferchen added a commit that referenced this pull request May 1, 2026
…dling (#2859)

* fix: correct --files-from operand assembly and implied --relative handling

When --files-from is active, the source directory should serve only as
a base for resolving file list entries, not appear as a separate transfer
operand. This caused duplicate source paths and incorrect file placement.

Additionally, --files-from implies --relative (upstream options.c:2187),
so file list entries are now joined with a ./ marker (e.g., /src/./file.txt)
enabling the engine's relative_root() to strip the base prefix correctly.

upstream: main.c:780-790 - source dir is chdir target, not transfer source

* style: fix cargo fmt in files_from operand assembly
oferchen added a commit that referenced this pull request May 5, 2026
…dling (#2859)

* fix: correct --files-from operand assembly and implied --relative handling

When --files-from is active, the source directory should serve only as
a base for resolving file list entries, not appear as a separate transfer
operand. This caused duplicate source paths and incorrect file placement.

Additionally, --files-from implies --relative (upstream options.c:2187),
so file list entries are now joined with a ./ marker (e.g., /src/./file.txt)
enabling the engine's relative_root() to strip the base prefix correctly.

upstream: main.c:780-790 - source dir is chdir target, not transfer source

* style: fix cargo fmt in files_from operand assembly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant