Repository navigation
Conversation
In merge mode an opaque marker removed every entry beneath its directory, including entries the same layer wrote in that directory before the marker. Record the names of the entries the layer wrote in each directory on the path of its latest entry, and keep those when an opaque marker in that directory removes the entries of earlier layers. A subdirectory the layer wrote entries in without an entry of its own is recorded in the list of its parent. Tar streams group the entries of a directory together, with the entries of its subdirectories among them. The list of a directory is dropped once the stream moves on to a sibling of it. An opaque marker that comes after the stream has left its directory is not supported. Signed-off-by: Derek McGowan <derek@mcg.dev>
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.
In merge mode (
WithMerge), an opaque marker removed everything beneath itsdirectory. That included entries the same layer wrote in that directory before
the marker, such as names starting with
-, which sort before..Applynow records the names the layer wrote in each directory on the path ofits latest entry. When an opaque marker appears in one of those directories,
those names are kept and only entries from earlier layers are removed. A
subdirectory the layer wrote entries in without an entry of its own is recorded
in the list of its parent. Tar streams group the entries of a directory
together, with the entries of its subdirectories among them, so the list of a
directory is dropped once the stream moves on to a sibling of it. An opaque
marker that comes after the stream has left its directory is not supported.
Testing
TestMergeOpaqueAfterEntries: an opaque marker keeps the layer's own earlierentries in the directory, including subdirectories with or without an entry
of their own and a nested opaque directory, and removes the lower layers'
files and subdirectories.
go test ./tarconv/ ./fs/...passes.