-
Notifications
You must be signed in to change notification settings - Fork 27
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
max-minors lists too many commits in last listed tag #92
Comments
|
I could reproduce it on this repo: These are the expected commits for v0.3.0.
However:
|
The issue is here: https://github.com/convco/convco/blob/master/src/cmd/changelog.rs#L323 .chain(Some(Rev(rev_stop, None))) where |
I see the same issue. A lot more change entries, which do not belong into the tag. |
This should fix it, but I have to test it a bit more diff --git a/src/cmd/changelog.rs b/src/cmd/changelog.rs
index 80e6260..391f2e0 100644
--- a/src/cmd/changelog.rs
+++ b/src/cmd/changelog.rs
@@ -315,9 +315,6 @@ impl ChangelogCommand {
.into_iter()
.rev()
.take_while(|v| v.tag != rev_stop)
- .take_while(|v| v.version.major() >= stop_at_major)
- .take_while(|v| v.version.minor() >= stop_at_minor)
- .take_while(|v| v.version.patch() >= stop_at_patch)
.map(|v| v.into()),
)
.chain(Some(Rev(rev_stop, None)))
@@ -326,6 +323,16 @@ impl ChangelogCommand {
for w in iter.windows(2) {
let from = &w[0];
let to = &w[1];
+ match from {
+ Rev(_, Some(v))
+ if v.major() < stop_at_major
+ || v.minor() < stop_at_minor
+ || v.patch() < stop_at_patch =>
+ {
+ break
+ }
+ _ => (),
+ }
let context = transformer.transform(from, to)?;
if !self.skip_empty || !context.context.commit_groups.is_empty() {
writer.write_template(&context)?; |
The latest tag does not take commits of lower version when limited by `--max-majors`, `--max-minors` or `--max-patches`. Refs: #92
@ctron @ite-klass Would you be able to test #93 on your repos before I merge it? |
Looks good to me. |
The latest tag does not take commits of lower version when limited by `--max-majors`, `--max-minors` or `--max-patches`. Refs: #92
LGTM for the bug test case; the list does not include too many commits anymore |
When I use
--max-minors 1
I see a lot more commits within the latest tag changes than I expect. There seems to be a logic issue. It lists commits of previous tags.Looking at the output for values 1 2 and 3, it looks like it always lists commits that should be ommitted in the last displayed tag.
If it makes a difference, I am using a
tag..
range parameter too.System (please complete the following information):
The text was updated successfully, but these errors were encountered: