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

Add explicit --pass-through flag and default to enabled for *cat #3223

Merged
merged 1 commit into from
Aug 5, 2022

Conversation

terrelln
Copy link
Contributor

Fixes #3211.

Adds the --[no-]pass-through flag which enables/disables pass-through mode.

  • zstdcat, zcat, and gzcat default to --pass-through.
    Pass-through mode can be disabled by passing --no-pass-through.
  • All other binaries default to not setting pass-through mode.
    However, we preserve the legacy behavior of enabling pass-through
    mode when writing to stdout with -f set, unless pass-through
    mode is explicitly disabled with --no-pass-through.

Adds a new test for this behavior that should codify the behavior we want.

Copy link
Contributor

@felixhandte felixhandte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool.

programs/fileio.c Outdated Show resolved Hide resolved
@cgbur
Copy link
Contributor

cgbur commented Aug 4, 2022

This looks awesome, thanks for the work in getting this done!

Fixes facebook#3211.

Adds the `--[no-]pass-through` flag which enables/disables pass-through mode.

* `zstdcat`, `zcat`, and `gzcat` default to `--pass-through`.
  Pass-through mode can be disabled by passing `--no-pass-through`.
* All other binaries default to not setting pass-through mode.
  However, we preserve the legacy behavior of enabling pass-through
  mode when writing to stdout with `-f` set, unless pass-through
  mode is explicitly disabled with `--no-pass-through`.

Adds a new test for this behavior that should codify the behavior we want.
@terrelln terrelln merged commit 03cc84f into facebook:dev Aug 5, 2022
Sign up for free to 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.

Passthrough inconsistent behavior depending on -o flag
4 participants