Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move prioritized files argument to option #206

Merged
merged 1 commit into from
Dec 17, 2020

Conversation

ktock
Copy link
Member

@ktock ktock commented Dec 17, 2020

#203

This moves prioritized files argument to option.
There are cases where input tar entiy names are prefixed with "./" (which is
still valid) but we shouldn't expose this difference in the option.
So this commit also adds a simple normalization (trimming "./" prefix).

Signed-off-by: Kohei Tokunaga ktokunaga.mail@gmail.com

There are cases where input tar entiy names are prefixed with "./" (which is
still valid) but we shouldn't expose this difference in the option.
So this commit also adds a simple normalization (trimming "./" prefix).

Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
// These files must be a complete path relative to "/" (e.g. "foo/bar",
// "./foo/bar")
func WithPrioritizedFiles(files []string) Option {
return func(o *options) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should verify files and return error.

Can be a follow-up PR.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll work on it in the following up PR.

Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but a single nit

@AkihiroSuda AkihiroSuda merged commit 3af9df4 into containerd:master Dec 17, 2020
@ktock ktock deleted the p-opt branch October 7, 2022 13:45
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.

2 participants