Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Several cleanups to
SignCmd
(sigstore#674)
1. Use the `DefaultRegistryClientOpts` which is a superset of what we use now, but sets `User-Agent`, 2. Pre-allocate the `toSign` array to have space for at least the number of images passed in (only more if recursive), 3. Use `Digest` to access the initial hash, which saves a `remote.Get` when we're passed a digest and non-recursive (at the cost of two requests when we are passed a tag in recursive mode), 4. Change the way we iterate over `toSign` to be conventional (not sure why we were doing it the other way before, but I'm guessing the two loops we now have were previously fused). Signed-off-by: Matt Moore <mattomata@gmail.com>
- Loading branch information