Skip to content

feat(logging): wire --info=NAME level 2 emissions in copy/link/del paths - #4099

Merged
oferchen merged 2 commits into
masterfrom
feat/info-name-level2-emissions-2159
May 15, 2026
Merged

oferchen merged 2 commits into
masterfrom
feat/info-name-level2-emissions-2159

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

Wires upstream rsync's --info=NAME per-file action lines into oc-rsync's copy/link/del action sites. Refs #2159, parent G5 meta #2151.

  • NAME 1 "%s => %s" for hard-link creation (upstream: hlink.c:236). Added at the three local-copy hard-link sites (--link-dest, cached-inode reuse, reference-directory link) and at the receiver's hardlink follower create site.
  • NAME 2 "%s is uptodate" for already-current destinations (upstream: rsync.c:672-676, generator.c:1010/1133, hlink.c:223). Added at the local-copy metadata-only skip path, the local-copy reference-directory Skip decision, the receiver hardlink already-linked branch, and the receiver symlink up-to-date branch.
  • Delete sites already emit info_log!(Del, 1, "deleting ...") matching upstream log.c:864-868; no NAME emission applies (upstream gates log_delete on INFO_GTE(DEL, 1)).

Each emission cites the upstream file and line. The info_log! macro gates formatting on the configured flag level so emissions cost zero when disabled.

Test plan

  • Unit pinning tests in crates/engine/src/local_copy/executor/file/copy/links.rs for the NAME 1 => and NAME 2 is uptodate shapes and level-gate suppression.
  • Unit pinning tests in crates/transfer/src/receiver/directory/links.rs covering the hardlink follower NAME 1/2 emissions and the level-zero suppression case.
  • CI fmt+clippy, nextest (stable), Windows, macOS, Linux musl.

Refs #2159, parent G5 meta #2151.

Adds per-file action lines for `--info=NAME` levels 1 and 2 mirroring
upstream rsync 3.4.1:

- NAME 1 `"%s => %s"` for hard-link creation (upstream: hlink.c:236).
  Wired into the local-copy executor (three sites: --link-dest,
  cached-inode link, reference-directory link) and the receiver
  hardlink follower path.
- NAME 2 `"%s is uptodate"` for matched/quick-check paths (upstream:
  rsync.c:672-676, generator.c:1010/1133, hlink.c:223). Wired into
  the local-copy metadata-only skip path, the local-copy
  reference-directory `Skip` decision, the receiver hardlink
  already-linked branch, and the receiver symlink up-to-date branch.

Adds byte-for-byte pinning tests in both crates verifying the
emission shape and the level gate (suppressed below the configured
NAME level).
@github-actions github-actions Bot added the enhancement New feature or request label May 15, 2026
@oferchen
oferchen merged commit b6bee15 into master May 15, 2026
38 of 39 checks passed
@oferchen
oferchen deleted the feat/info-name-level2-emissions-2159 branch May 16, 2026 19:50
oferchen added a commit that referenced this pull request May 18, 2026
…ths (#4099)

* feat(logging): wire --info=NAME level 2 emissions in copy/link/del paths

Refs #2159, parent G5 meta #2151.

Adds per-file action lines for `--info=NAME` levels 1 and 2 mirroring
upstream rsync 3.4.1:

- NAME 1 `"%s => %s"` for hard-link creation (upstream: hlink.c:236).
  Wired into the local-copy executor (three sites: --link-dest,
  cached-inode link, reference-directory link) and the receiver
  hardlink follower path.
- NAME 2 `"%s is uptodate"` for matched/quick-check paths (upstream:
  rsync.c:672-676, generator.c:1010/1133, hlink.c:223). Wired into
  the local-copy metadata-only skip path, the local-copy
  reference-directory `Skip` decision, the receiver hardlink
  already-linked branch, and the receiver symlink up-to-date branch.

Adds byte-for-byte pinning tests in both crates verifying the
emission shape and the level gate (suppressed below the configured
NAME level).

* style: apply rustfmt to NAME emission test imports and macro calls
oferchen added a commit that referenced this pull request May 18, 2026
…ths (#4099)

* feat(logging): wire --info=NAME level 2 emissions in copy/link/del paths

Refs #2159, parent G5 meta #2151.

Adds per-file action lines for `--info=NAME` levels 1 and 2 mirroring
upstream rsync 3.4.1:

- NAME 1 `"%s => %s"` for hard-link creation (upstream: hlink.c:236).
  Wired into the local-copy executor (three sites: --link-dest,
  cached-inode link, reference-directory link) and the receiver
  hardlink follower path.
- NAME 2 `"%s is uptodate"` for matched/quick-check paths (upstream:
  rsync.c:672-676, generator.c:1010/1133, hlink.c:223). Wired into
  the local-copy metadata-only skip path, the local-copy
  reference-directory `Skip` decision, the receiver hardlink
  already-linked branch, and the receiver symlink up-to-date branch.

Adds byte-for-byte pinning tests in both crates verifying the
emission shape and the level gate (suppressed below the configured
NAME level).

* style: apply rustfmt to NAME emission test imports and macro calls
oferchen added a commit that referenced this pull request Aug 24, 2026
…ths (#4099)

* feat(logging): wire --info=NAME level 2 emissions in copy/link/del paths

Refs #2159, parent G5 meta #2151.

Adds per-file action lines for `--info=NAME` levels 1 and 2 mirroring
upstream rsync 3.4.1:

- NAME 1 `"%s => %s"` for hard-link creation (upstream: hlink.c:236).
  Wired into the local-copy executor (three sites: --link-dest,
  cached-inode link, reference-directory link) and the receiver
  hardlink follower path.
- NAME 2 `"%s is uptodate"` for matched/quick-check paths (upstream:
  rsync.c:672-676, generator.c:1010/1133, hlink.c:223). Wired into
  the local-copy metadata-only skip path, the local-copy
  reference-directory `Skip` decision, the receiver hardlink
  already-linked branch, and the receiver symlink up-to-date branch.

Adds byte-for-byte pinning tests in both crates verifying the
emission shape and the level gate (suppressed below the configured
NAME level).

* style: apply rustfmt to NAME emission test imports and macro calls
oferchen added a commit that referenced this pull request Aug 24, 2026
…ths (#4099)

* feat(logging): wire --info=NAME level 2 emissions in copy/link/del paths

Refs #2159, parent G5 meta #2151.

Adds per-file action lines for `--info=NAME` levels 1 and 2 mirroring
upstream rsync 3.4.1:

- NAME 1 `"%s => %s"` for hard-link creation (upstream: hlink.c:236).
  Wired into the local-copy executor (three sites: --link-dest,
  cached-inode link, reference-directory link) and the receiver
  hardlink follower path.
- NAME 2 `"%s is uptodate"` for matched/quick-check paths (upstream:
  rsync.c:672-676, generator.c:1010/1133, hlink.c:223). Wired into
  the local-copy metadata-only skip path, the local-copy
  reference-directory `Skip` decision, the receiver hardlink
  already-linked branch, and the receiver symlink up-to-date branch.

Adds byte-for-byte pinning tests in both crates verifying the
emission shape and the level gate (suppressed below the configured
NAME level).

* style: apply rustfmt to NAME emission test imports and macro calls
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant