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

Tar / zip a directory instead of sending individual files. #487

Closed
stefins opened this issue Jul 4, 2022 · 9 comments
Closed

Tar / zip a directory instead of sending individual files. #487

stefins opened this issue Jul 4, 2022 · 9 comments

Comments

@stefins
Copy link
Contributor

stefins commented Jul 4, 2022

Is your feature request related to a problem? Please describe.
Right now croc send all the individual files in a directory recursively which increases the time to send the directory if it contains many files.
eg. a .git directory

Describe the solution you'd like
The solution I'm suggesting is that to tar / zip the entire directory and send it as an individual file.

Describe alternatives you've considered

Additional context

@stefins stefins changed the title Tar a directory instead of sending individual files. Tar / zip a directory instead of sending individual files. Jul 4, 2022
@schollz
Copy link
Owner

schollz commented Jul 4, 2022

As far as I can determine, this feature would be incompatible with being able to resume file transfers. But if you know there is a way to do it, feel free to discuss / make a PR

@stefins
Copy link
Contributor Author

stefins commented Jul 5, 2022

We can define a cli flag to enable this feature

@schollz
Copy link
Owner

schollz commented Jul 5, 2022

Ah yeah I get it, that makes sense

@stefins
Copy link
Contributor Author

stefins commented Jul 5, 2022

I'm writing a PR for this!

@schollz
Copy link
Owner

schollz commented Jul 5, 2022

Ok cool! I was about to so thanks for letting me know. If you have any questions feel free to ask!

@stefins
Copy link
Contributor Author

stefins commented Jul 7, 2022

Fixed in #488

@stefins stefins closed this as completed Jul 7, 2022
@nivekuil
Copy link

Tested this, much faster and convenient but it doesn't include empty directories, which seems undesirable

@stellarpower
Copy link

This is really useful for sending built code as an example. We want to make sure we retain all ownership and permissions, not follow symlinks, and it's a nice feature to have one stage that creates and extracts the tarball. I'd happily forego the ability to resume a botched transfer in cases like this.

@schollz
Copy link
Owner

schollz commented Jul 31, 2022

Tested this, much faster and convenient but it doesn't include empty directories, which seems undesirable

That sounds like a bug, would you make an issue?

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

No branches or pull requests

4 participants