Skip to content

fix: remove root from virtual referrers#1130

Merged
qweeah merged 1 commit into
oras-project:mainfrom
shizhMSFT:fix_cp_loop
Sep 25, 2023
Merged

fix: remove root from virtual referrers#1130
qweeah merged 1 commit into
oras-project:mainfrom
shizhMSFT:fix_cp_loop

Conversation

@shizhMSFT

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:
Fix a bug when oras cp -r a loop index.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #1129

Please check the following list:

  • Does the affected code have corresponding tests, e.g. unit test, E2E test?
  • Does this change require a documentation update?
  • Does this introduce breaking changes that would require an announcement or bumping the major version?
  • Do all new files have an appropriate license header?

Signed-off-by: Shiwei Zhang <shizh@microsoft.com>
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

Merging #1130 (89f4bed) into main (8cf946f) will decrease coverage by 0.05%.
The diff coverage is 100.00%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

@@            Coverage Diff             @@
##             main    #1130      +/-   ##
==========================================
- Coverage   80.10%   80.06%   -0.05%     
==========================================
  Files          57       57              
  Lines        2991     2994       +3     
==========================================
+ Hits         2396     2397       +1     
- Misses        410      412       +2     
  Partials      185      185              
Files Changed Coverage Δ
cmd/oras/root/cp.go 81.36% <100.00%> (+0.35%) ⬆️

... and 1 file with indirect coverage changes

@sajayantony

Copy link
Copy Markdown
Contributor

Should we include a test for this case?

@qweeah qweeah left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. BTW is this allowed by spec? Having a subject which is also a member of manifests sound wierd.

@qweeah

qweeah commented Sep 23, 2023

Copy link
Copy Markdown
Contributor

Should we include a test for this case?

I can add one

@qweeah qweeah merged commit 4cf5390 into oras-project:main Sep 25, 2023
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.

oras cp -r fails if index has a child manifest as subject

4 participants