1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-29 11:16:43 +00:00

Merge pull request #3722 from ThomasWaldmann/stdin-filename

create: implement --stdin-name, fixes #3533
This commit is contained in:
TW 2018-03-25 00:35:40 +01:00 committed by GitHub
commit 5b824f54dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -455,7 +455,7 @@ def create_inner(archive, cache, fso):
pass pass
for path in args.paths: for path in args.paths:
if path == '-': # stdin if path == '-': # stdin
path = 'stdin' path = args.stdin_name
if not dry_run: if not dry_run:
try: try:
status = fso.process_stdin(path, cache) status = fso.process_stdin(path, cache)
@ -2940,6 +2940,8 @@ def define_archive_filters_group(subparser, *, sort_by=True, first_last=True):
help='experimental: do not synchronize the cache. Implies not using the files cache.') help='experimental: do not synchronize the cache. Implies not using the files cache.')
subparser.add_argument('--no-files-cache', dest='cache_files', action='store_false', subparser.add_argument('--no-files-cache', dest='cache_files', action='store_false',
help='do not load/update the file metadata cache used to detect unchanged files') help='do not load/update the file metadata cache used to detect unchanged files')
subparser.add_argument('--stdin-name', metavar='NAME', dest='stdin_name', default='stdin',
help='use NAME in archive for stdin data (default: "stdin")')
exclude_group = define_exclusion_group(subparser, tag_files=True) exclude_group = define_exclusion_group(subparser, tag_files=True)
exclude_group.add_argument('--exclude-nodump', dest='exclude_nodump', action='store_true', exclude_group.add_argument('--exclude-nodump', dest='exclude_nodump', action='store_true',