Skip to content

feat(cli): make folder tracking opt-in with --track - #21

Merged
lstocchi merged 1 commit into
redhat-developer:mainfrom
lstocchi:track_optin
Nov 30, 2026
Merged

lstocchi merged 1 commit into
redhat-developer:mainfrom
lstocchi:track_optin

Conversation

@lstocchi

Copy link
Copy Markdown
Collaborator

create --track records the imported --add content in each source's git repository: a baseline commit refs/ext4kit/<label>/base parented on HEAD, and a sidecar beside the image tying the image UUID to the label and its mappings. --label names the refs and --include-ignored widens the baseline; both require --track. --discard-unsnapshotted and --replace-mounted override the old-image gates and work without it, since they protect the existing image, not the new one.

The checks run before the output is truncated and retirement runs after the network work, so a refusal or a registry failure leaves the old image, sidecar and refs untouched. A base or sidecar failure leaves the image valid: the refs this run created are removed by SHA and the create still succeeds. Nothing announces the baseline before the sidecar that publishes it is on disk.

The end-to-end suite covers the sidecar and base shape, file mappings, a dirty worktree, the ignore policy, opt-in, images with nothing to track, e2fsck cleanliness and the sidecar-write rollback across two repositories. The docs state the 100 MiB per-file cap, which keeps an oversized file out of the baseline with a note, and --verbose.

`create --track` records the imported `--add` content in each source's
git repository: a baseline commit `refs/ext4kit/<label>/base` parented
on HEAD, and a sidecar beside the image tying the image UUID to the
label and its mappings. `--label` names the refs and `--include-ignored`
widens the baseline; both require `--track`. `--discard-unsnapshotted`
and `--replace-mounted` override the old-image gates and work without
it, since they protect the existing image, not the new one.

The checks run before the output is truncated and retirement runs after
the network work, so a refusal or a registry failure leaves the old
image, sidecar and refs untouched. A base or sidecar failure leaves the
image valid: the refs this run created are removed by SHA and the
create still succeeds. Nothing announces the baseline before the
sidecar that publishes it is on disk.

The end-to-end suite covers the sidecar and base shape, file mappings, a
dirty worktree, the ignore policy, opt-in, images with nothing to track,
e2fsck cleanliness and the sidecar-write rollback across two
repositories. The docs state the 100 MiB per-file cap, which keeps an
oversized file out of the baseline with a note, and --verbose.

Assisted-by: Claude Code: DeepSeek-V4.1-Flash
Signed-off-by: Luca Stocchi <lstocchi@redhat.com>
@lstocchi
lstocchi merged commit a771e74 into redhat-developer:main Nov 30, 2026
4 checks passed
@lstocchi
lstocchi deleted the track_optin branch November 30, 2026 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant