I think this is just visually noisy. If we didn't do a partial
fetch then let's just not say anything about it.
Signed-off-by: Colin Walters <walters@verbum.org>
Current .codespellrc contains too many exclusions, and as a result it
misses some legitimate typos.
A few previous commits silenced or fixed some of the codespell warnings
in preparation for this one, which minimizes exclusions, and fixes the
actual remaining typos.
The fixes here are the result of codespell -w.
./copy/sign_test.go:119: overidden ==> overridden
./copy/encryption.go:51: pratice ==> practice
./copy/multiple_test.go:80: crated ==> created
./copy/progress_bars.go:124: progres ==> progress
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
if the specified length for the range is set to -1, then request all
the data possible by using the "Range: <unit>=<range-start>-" syntax
for the HTTP range.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
... to prevent panics if the value does not contain a :, or other unexpected
values (e.g. a path traversal).
Don't bother on paths where we computed the digest ourselves, or it is already trusted
for other reasons.
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
When the writer is set to `io.Discard` make sure to print the
`Copying ...` output once. The partial pull attempt caused
the line to be printed twice rendering the output of
`podman-remote pull ...` a bit too verbose.
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
This correctly handles both the "size known" and the "size unknown" cases,
and because we now record the originally-configured progress bar size
in the progressBar struct, the caller doesn't need to track it.
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This will allow us to add more state and methods to the bar
object, without copy&pasting.
For now, this just wraps one pointer in another, and should
not change behavior.
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Second part: Move blobChunkAccessorProxy to the newly established
progress_bars.go.
Only moves unchanged code, should not change behavior.
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Let's try to make copy.go shorter, and consolidate progress bar code to
new copy/progress_bars.go.
First, move the code from copy.go.
Only moves unchanged code, should not change behavior.
Signed-off-by: Miloslav Trmač <mitr@redhat.com>