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

Order of files feels backwards #10

Closed
DavidGamba opened this issue Oct 21, 2020 · 3 comments
Closed

Order of files feels backwards #10

DavidGamba opened this issue Oct 21, 2020 · 3 comments

Comments

@DavidGamba
Copy link
Contributor

When I call dap I expect: dap <source> <destination>, it expects dap <destination> <source>.

What is the rationale behind that?

@mgale
Copy link
Owner

mgale commented Oct 22, 2020

Originally I modeled the input after Patch and https://github.com/google/diff-match-patch
https://man7.org/linux/man-pages/man1/patch.1.html
https://github.com/google/diff-match-patch/wiki/API

The text describes the process as ".... differences is computed which describe the transformation of text1 into text2". I thought of it as:

dap <original> <desired_state>

However I am open to changing it, thoughts?

@DavidGamba
Copy link
Contributor Author

That order also matches the order of git diff --no-index it seems. Mind if I submit a PR to have the error help changed to:

ERROR: Missing required arguments!
NAME:
    dap - Transforms <original> into <desired_changes>. Said another way, brings changes into <original> from <desired_changes>.

        Example: ./dap original desired_changes

SYNOPSIS:
    dap [--debug] [--dry-run] [--follow-sym-links] [--help|-h|-?]
        [--ignore-paths <string>]... [--include-hidden] [--report-only|-q]
        [--version|-V] <original> <desired_changes>

OPTIONS:
    --debug                    (default: false)

    --dry-run                  Dry-run skips updating the underlying file contents (default: false)

    --follow-sym-links         Follow symlinks (default: false)

    --help|-h|-?               (default: false)

    --ignore-paths <string>    Excludes pathnames from directory search, providing a value overrides the defaults of .git and .terraform (default: [])

    --include-hidden           Include hidden files and directories (default: false)

    --report-only|-q           Report only files that differ (default: false)

    --version|-V               (default: false)

@DavidGamba
Copy link
Contributor Author

Fixed in #11

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

2 participants