Skip to content

Remove the explicit --revision & --path arguments #4

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

Open
tommarshall opened this issue Jul 28, 2016 · 0 comments
Open

Remove the explicit --revision & --path arguments #4

tommarshall opened this issue Jul 28, 2016 · 0 comments

Comments

@tommarshall
Copy link
Owner

Currently git-diff-ansible-vault requires the revision and path to be explicitly specified with arguments, e.g.

$ git diff-ansible-vault -r master..some-branch -p some/path/to/file

It would be better to have parity with git-diff's revision and path arguments, so that you could jump straight from diff to diff-ansible-vault without having to add extra flags.

From git-diff's man page:

       git diff [--options] [--] [<path>...]

       git diff [--options] <commit> [--] [<path>...]

       git diff [--options] <commit> <commit> [--] [<path>...]

       git diff [--options] <commit>..<commit> [--] [<path>...]

       git diff [--options] <commit>...<commit> [--] [<path>...]

       git diff [options] <blob> <blob>
tommarshall added a commit that referenced this issue Aug 16, 2016
Because:

* `git diff` supports paging to provide a better experience on long
  diffs. This would also be useful for files encrypted with ansible
  vault.

This change:

* Attempts to identify the default pager setup the same way that git
  itself does, and uses the same default args, ref:
  https://github.com/git/git/blob/v2.9.2/pager.c#L43-L74
* Adds support for git's `--no-pager` argument, but not `-p`/
  `--paginate` as this would colide with `-p`/`--path`. May want to
  revisit this later once #4 is resolved.

Fixes #3
tommarshall added a commit that referenced this issue Aug 16, 2016
Because:

* `git diff` supports paging to provide a better experience on long
  diffs. This would also be useful for files encrypted with ansible
  vault.

This change:

* Attempts to identify the default pager setup the same way that git
  itself does, and uses the same default args, ref:
  https://github.com/git/git/blob/v2.9.2/pager.c#L43-L74
* Adds support for git's `--no-pager` argument, but not `-p`/
  `--paginate` as this would colide with `-p`/`--path`. May want to
  revisit this later once #4 is resolved.

Fixes #3
tommarshall added a commit that referenced this issue Aug 16, 2016
Because:

* `git diff` supports paging to provide a better experience on long
  diffs. This would also be useful for files encrypted with ansible
  vault.

This change:

* Attempts to identify the default pager setup the same way that git
  itself does, and uses the same default args, ref:
  https://github.com/git/git/blob/v2.9.2/pager.c#L43-L74
* Adds support for git's `--no-pager` argument, but not `-p`/
  `--paginate` as this would colide with `-p`/`--path`. May want to
  revisit this later once #4 is resolved.

Fixes #3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant