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

sort_commits doesn't work but --sort does #39

Closed
azzamsa opened this issue Dec 3, 2021 · 4 comments
Closed

sort_commits doesn't work but --sort does #39

azzamsa opened this issue Dec 3, 2021 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@azzamsa
Copy link

azzamsa commented Dec 3, 2021

Describe the bug
I want my commits to be sorted by the newest time. However, it does not work using sort_commits = "newest" but it works using --sort newest

To Reproduce
Steps to reproduce the behavior:

  1. git clone https://github.com/orhun/git-cliff
  2. cd git-cliff
  3. git-cliff --config config/cliff.toml --tag 0.1.0-beta.3

image

  1. change sort_commits = "oldest" to sort_commits = "newest" in /git-cliff/config/cliff.toml
    the run the same command git-cliff --config config/cliff.toml --tag 0.1.0-beta.3

image

The order is same. no chages


  1. Now, remove the sort_commits = "newest" line the config.
  2. run git-cliff --config config/cliff.toml --tag 0.1.0-beta.3 --sort newest and git-cliff --config config/cliff.toml --tag 0.1.0-beta.3 --sort oldest. Now it works.
  3. Got the error?

Expected behavior
sort_commits = "newest" should output the same exact thing as --sort newest

Screenshots/Logs
Attached.

System (please complete the following information):

❯ git-cliff --version
git-cliff 0.4.2, version: https://github.com/orhun/git-cliff/commit/02a6187a58583f27e4604d7ea518b52b4bc7a833

OS: Debian GNU/Linux 11 (bullseye)
Kernel: Linux 5.10.0-9-amd64 x86_64

Additional context
Thanks for git-cliff.

@azzamsa azzamsa added the bug Something isn't working label Dec 3, 2021
@orhun
Copy link
Owner

orhun commented Dec 3, 2021

Hello, thanks for reporting this! 🐻

I realized, in 4eb334d, I'm overriding the values of command line arguments no matter what if the config file has the same entry. So I fixed that situation in ef63727, can you check and verify that it works as expected with this change now?

@azzamsa
Copy link
Author

azzamsa commented Dec 3, 2021

I did cargo install git-ciff -f, but the issue still there.

I cant make sure since we don't have a git hash in our --version

@orhun
Copy link
Owner

orhun commented Dec 3, 2021

I did cargo install git-ciff -f, but the issue still there.

cargo install does not pull the latest revision from git. You can build from source or use docker images to try it out until a new version is published.

@azzamsa
Copy link
Author

azzamsa commented Dec 8, 2021

Oh, OK.

Now runni ./target/release/git-cliff --config config/cliff.toml --tag 0.1.0-beta.3 solves the issue.

Thanks a lot for git-cilff, Orhun.

@azzamsa azzamsa closed this as completed Dec 8, 2021
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

2 participants