Skip to content

moby/moby#37961 : cp command can copy multiple files - #1495

Closed
fossilmfc wants to merge 7 commits into
docker:masterfrom
fossilmfc:implements-moby-feature-request-#37961
Closed

moby/moby#37961 : cp command can copy multiple files#1495
fossilmfc wants to merge 7 commits into
docker:masterfrom
fossilmfc:implements-moby-feature-request-#37961

Conversation

@fossilmfc

Copy link
Copy Markdown

Implemented multiple files copy functionality, described and requested under moby/moby issue no moby/moby#37961

Example:
docker cp container:file-a container:file-b local
docker cp local-file-a local-file-b container:folder

- What and How I did
I've modified cp.go to handle more than 2 arguments, handled error cases as were defined before, where logic states for N number of sources and 1 destination only.

- How to verify it
Now it is possible to use docker cp as defined in example.

- Description for the changelog
docker cp support for multiple files in one command

@GordonTheTurtle

Copy link
Copy Markdown

Please sign your commits following these rules:
https://github.com/moby/moby/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:

$ git clone -b "implements-moby-feature-request-#37961" git@github.com:fossilmfc/cli.git somewhere
$ cd somewhere
$ git commit --amend -s --no-edit
$ git push -f

Amending updates the existing PR. You DO NOT need to open a new one.

… does
fixed broken tests
Signed-off-by: Filip Ilavský <fossilmfc@gmail.com>
… does
fixed broken tests
Signed-off-by: Filip Ilavský <fossilmfc@gmail.com>
…ub.com/fossilmfc/cli into implements-moby-feature-request-#37961
# Conflicts:
#	cli/command/container/cp.go
@codecov-io

codecov-io commented Nov 5, 2018

Copy link
Copy Markdown

Codecov Report

Merging #1495 into master will decrease coverage by <.01%.
The diff coverage is 61.9%.

@@ Coverage Diff @@## master #1495 +/- ##
==========================================
- Coverage 55.14% 55.14% -0.01% 
==========================================
Files 289 289 Lines 19371 19391 +20 ==========================================
+ Hits 10683 10693 +10 - Misses 7997 8007 +10 
Partials 691 691

@fossilmfc
fossilmfc deleted the implements-moby-feature-request-#37961 branch July 8, 2021 11:00
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@fossilmfc@GordonTheTurtle@codecov-io@thaJeztah