-
-
Notifications
You must be signed in to change notification settings - Fork 756
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
create: implement --paths-from-stdin and --paths-from-command #5538
Conversation
after you fix that, the real tests will run. |
can you fix the commit comment, the PR top post, etc., please? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the PR, nice powerful functionality!
would be cool to get this into 1.2.0b1 (soon). |
These switches reads paths to archive from stdin. Delimiter can specified by --paths-delimiter=DELIM. Paths read will be added honoring every option but exclusion options and --one-file-system. Directories aren't recursed into.
Sorry for the force-push, i needed to edit the commit message... |
Codecov Report
@@ Coverage Diff @@
## master #5538 +/- ##
==========================================
+ Coverage 83.08% 83.13% +0.04%
==========================================
Files 38 38
Lines 10003 10054 +51
Branches 1657 1668 +11
==========================================
+ Hits 8311 8358 +47
- Misses 1202 1203 +1
- Partials 490 493 +3
Continue to review full report at Codecov.
|
No problem, there is no other way than to force-push if one edits history. Shall I merge it like this for now and we check the bytes vs. text paths later? |
No wait a bit, i'm testing it and there is a weird bug, it's really not doing what it should. |
guess a test would be fine also. |
Ok, this should be fine now. The tests are mostly copy&paste from content-from-command.. not really exhaustive in any way neither. About the text/binary thing, i realized |
Thanks! Merged! I created a related issue #5551. |
WIP. Follow-up of #5492. Implement two switches which shortcut the filesystem-walking logic completely: borg will read the paths and backup without doing any recursion (directories can --and should-- be passed). Should honor any relevant option (common options and all filesystem option but --one-file-system).
Slight change from my earlier proposal: now if either
--paths-from-stdin
or--paths-from-command
are given, then it won't process any normal path fromargs.path
. In--path-from-command
it wouldn't make sense anyway sinceargs.path
is being used for the command. Technically, for--paths-from-stdin
we could still handleargs.path
as usual but it's probably safe to assume that a user don't want to mix both things. Besides it simplifies the code and the top-level behavior ofcreate
.WIP: Just wrote, didn't execute! :) I should verify if it works correctly and add unit tests to the PR.