Skip to content

feat(cli): introduce new --last flag, to stop recommending HEAD~1#3916

Merged
escapedcat merged 4 commits intoconventional-changelog:masterfrom
knocte:wip/lastFlag
Mar 14, 2024
Merged

feat(cli): introduce new --last flag, to stop recommending HEAD~1#3916
escapedcat merged 4 commits intoconventional-changelog:masterfrom
knocte:wip/lastFlag

Conversation

@knocte
Copy link
Copy Markdown
Contributor

@knocte knocte commented Feb 14, 2024

HEAD~1 is brittle because it would fail in single-commit scenarios.

Closes #3892

@knocte knocte mentioned this pull request Feb 14, 2024
7 tasks
@escapedcat
Copy link
Copy Markdown
Member

Sorry, would you rebase this? Then it can be merged

Mersho and others added 3 commits March 12, 2024 15:59
The upgrade of ES2017 to ES2022 is because of the use of
`Object.hasOwn` API which is less ugly than hardcoding
`undefined`.
In a single-commit repo, this would lead to this error:

```
Error: fatal: ambiguous argument 'HEAD~1..HEAD': unknown revision
or path not in the working tree.
```

Now that we have the `--last` flag, this should work for the case
in which we want just to analyze the last commit, not specify a
range of commits via `--from` and `--to`.

Closes conventional-changelog#3892
@codesandbox-ci
Copy link
Copy Markdown

codesandbox-ci Bot commented Mar 13, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@knocte
Copy link
Copy Markdown
Contributor Author

knocte commented Mar 13, 2024

Sorry, would you rebase this? Then it can be merged

Done.

The latter adds unnecessary whitespace at the end of the commit
msg.
@escapedcat escapedcat merged commit 99f4f3f into conventional-changelog:master Mar 14, 2024
@escapedcat
Copy link
Copy Markdown
Member

Thanks!

@escapedcat
Copy link
Copy Markdown
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants