-
Notifications
You must be signed in to change notification settings - Fork 180
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
feat: add copyCmd() #432
feat: add copyCmd() #432
Conversation
Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@CharingJC Please
- Enhance option.Remote so it can be used on both source and destination target for copy command
- Add unit test for the added code
Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
cmd/oras/copy.go
Outdated
src, | ||
srcRef.ReferenceOrDefault(), | ||
dst, | ||
dstRef.ReferenceOrDefault(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shizhMSFT For the copy src and dest, should we disable auto-filling the latest
tag?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@CharingJC Please implement according to #439
cmd/oras/copy.go
Outdated
srcRef.ReferenceOrDefault(), | ||
dst, | ||
dstRef.ReferenceOrDefault(), | ||
oras.DefaultExtendedCopyOptions, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to add more detailed status tracking via setting the copy options. Please clarify the format and implement referring to push
command
Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
…funcs Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
…ate func description; feat: update copyCmd help info; feat: put copy & extendCopy func params into one line Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
cmd/oras/copy.go
Outdated
dstRef.ReferenceOrDefault(), | ||
oras.DefaultCopyOptions, | ||
) | ||
desc, err = oras.Copy(ctx, src, srcRef.ReferenceOrDefault(), dst, dstRef.ReferenceOrDefault(), oras.DefaultCopyOptions) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a strong opinion, I'd like to create a struct wrapping up related params instead of passing too many params directly.
Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Resolves #307
Signed-off-by: Juncheng Zhu junczhu@microsoft.com