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

Make default diff mode --git when using no arguments #1856

Merged
merged 1 commit into from
Jul 13, 2023

Conversation

mtdowling
Copy link
Member

Issue #, if available:

Description of changes:

Rather than fail when smithy diff is called with no arguments, we will insteadd assume that the caller meant smithy diff --mode git and use git mode against HEAD.

So now:

smithy diff # mode is --diff
smithy diff --old some-file --new some-file # mode is --arbitary
smithy diff --old some-file # Fails due to --arbitrary missing --new
smithy diff --new some-file # Fails due to --arbitrary missing --old

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Rather than fail when `smithy diff` is called with no arguments, we
will insteadd assume that the caller meant `smithy diff --mode git`
and use `git` mode against HEAD.

So now:

```
smithy diff # mode is --diff
smithy diff --old some-file --new some-file # mode is --arbitary
smithy diff --old some-file # Fails due to --arbitrary missing --new
smithy diff --new some-file # Fails due to --arbitrary missing --old
```
@mtdowling mtdowling requested a review from a team as a code owner July 13, 2023 18:01
@mtdowling mtdowling merged commit 0b93610 into main Jul 13, 2023
11 checks passed
@mtdowling mtdowling deleted the git-diff-default-mode branch September 11, 2023 18:21
This pull request was closed.
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

Successfully merging this pull request may close these issues.

2 participants