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

Running git cliff with --prepend requires '-u' or '-l' to be specified #68

Closed
metaclips opened this issue Mar 14, 2022 · 5 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@metaclips
Copy link

metaclips commented Mar 14, 2022

Describe the bug
Git cliff requires -u or -l flags when commit range and --prepend is used.

To Reproduce
Steps to reproduce the behavior:

  1. Run
git cliff start_commit..end_commit --prepend CHANGELOG.md
  1. See error
ERROR git_cliff > Argument error: `'-u' or '-l' is not specified`

Expected behavior
Command should run fine with CHANGELOG.md file prepended with the commits.

Running

git cliff start_commit..end_commit  --output CHANGELOG.md

runs pretty fine but creates a whole new entry deleting recent changelogs which really isn't what I want :(.

System (please complete the following information):

  • OS Information: macOS 12.2.1
  • Project Version: git-cliff 0.6.1

Additional context
Add any other context about the problem here.

@metaclips metaclips added the bug Something isn't working label Mar 14, 2022
@orhun orhun closed this as completed in 1bacc7f Mar 26, 2022
@orhun
Copy link
Owner

orhun commented Mar 26, 2022

Hello, thanks for reporting this!

It is fixed in 1bacc7f 🐻

@metaclips
Copy link
Author

Nice. Thanks!

@bukowabot
Copy link

bukowabot commented Jun 14, 2024

Not sure if this is a bug but if you unset GIT_CLIFF_PREPEND then it works.

+ : GIT_CLIFF_CONFIG: project-rp-npm/cliff.toml
+ : GIT_CLIFF_INCLUDE_PATH: 'project-rp-npm/**'
+ : GIT_CLIFF_TAG_PATTERN: 'project-rp-npm-v[0-9].*'
+ : GIT_CLIFF_IGNORE_TAGS: NOPE
+ : GIT_CLIFF_OUTPUT: ./project-rp-npm/CHANGELOG.LATEST.md
+ : GIT_CLIFF_PREPEND: ./project-rp-npm/CHANGELOG.md
+ : GIT_CLIFF_CONTEXT: ./project-rp-npm/GIT_CLIFF_CONTEXT.json
+ unset GIT_CLIFF_OUTPUT
+ git-cliff --context --output ./project-rp-npm/GIT_CLIFF_CONTEXT.json --bump
 ERROR git_cliff > Argument error: `'-u' or '-l' is not specified`

@orhun
Copy link
Owner

orhun commented Jun 14, 2024

Not sure what's going on there. Do you mean it doesn't work when you don't set it?

@bukowabot
Copy link

Yes sorry I included too much data and not enough context. I changed the way I generate and got rid of this error for now. It's for sure somehow bugged but looks like an edge case not worth playing around with for me, for now.
Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants