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

feat: allow filtering commits based on changed paths #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hawkw
Copy link

@hawkw hawkw commented Jun 6, 2022

This branch adds a new path_filters field to the Clog struct,
containing a list of paths in the repository to filter the git log
invocation. If there are paths in this list, the git log command will
end with -- <PATHS...>, which restricts the list of returned commits
to those which modify certain paths in the repo.

This is useful for cases where a project contains multiple crates or
binaries that should have separate changelogs. See also
clog-tool/clog-cli#109 for a related issue.

BREAKING CHANGE:

This adds a new field to the Clog struct. This is not backwards
compatible, as adding new fields will break exhaustive pattern matching
on that struct. See the Rust API Guidelines for details.

This branch adds a new `path_filters` field to the `Clog` struct,
containing a list of paths in the repository to filter the `git log`
invocation. If there are paths in this list, the `git log` command will
end with `-- <PATHS...>`, which restricts the list of returned commits
to those which modify certain paths in the repo.

This is useful for cases where a project contains multiple crates or
binaries that should have separate changelogs. See also
clog-tool/clog-cli#109 for a related issue.

BREAKING CHANGE:

This adds a new field to the `Clog` struct. This is not backwards
compatible, as adding new fields will break exhaustive pattern matching
on that struct. See [the Rust API Guidelines][1] for details.

[1]: https://rust-lang.github.io/api-guidelines/future-proofing.html#structs-have-private-fields-c-struct-private
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant