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

Fix descriptor matching logic #210

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Dec 20, 2018

  1. Fix descriptor matching logic

    This fixes commit dab5ba5.
    
    The `for i := 0; i < len(descs); i++` loops inside findDescriptor skip one
    entry of descs at each non-match because the array length is reduced by 1
    but the index i is not reduced:
    
    ```
    skopeo copy docker://ubuntu oci:dir:a
    skopeo copy docker://ubuntu oci:dir:b
    skopeo copy docker://ubuntu oci:dir:c
    ./oci-image-tool unpack --ref name=c dir dir2
    
    index.json: descriptor retrieved by refs [name=c] is not unique
    ```
    
    Signed-off-by: Rafael Gieschke <[email protected]>
    rafaelgieschke committed Dec 20, 2018
    Configuration menu
    Copy the full SHA
    741230e View commit details
    Browse the repository at this point in the history