clog-tool / clog-cli

Generate beautiful changelogs from your Git commit history
MIT License
851 stars 43 forks source link

Missing --to implementation and wrong documented --from? #80

Open MichaelHirn opened 8 years ago

MichaelHirn commented 8 years ago

I wanted to create a CHANGELOG for a repo, that already had some history and releases - thankfully the commits were all in the same style. Let's assume the repo already had two releases: 0.1.0 and 0.2.0.

So I expcted, that after the execution of the following commands, I would have a CHANGELOG file with the correct history.

clog --setversion 0.1.0 --from 123 --to 456 -C CHANGELOG.md
clog --setversion 0.2.0 --from 456 --to 789 -C CHANGELOG.md

As the docu stated --from and --to assume a commit hash. But after frustation of why clog didn't found the commit hash, I looked into the code and found, that --from works only with a version tag - which it then did. But for --to neither a version tag nor a commit hash worked and I couldn't find any actual implementation for that CLI option, either.

amandasaurus commented 8 years ago

I have made a pull request (#86) which fixes this. However IME it does support commits as well as tags for --from, and now --to. From looking at the clog-lib source code, it looks like it just passes the version string straight to the git command (see here), which according to the docs should work with tags and commit hashes.

kbknapp commented 8 years ago

@rory your commit has been merged with #87

@MichaelHirn does that fix the issue, or should this remain open for other fixes as well?