Skip to content

Commit

Permalink
feat: allow filtering commits based on changed paths
Browse files Browse the repository at this point in the history
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
  • Loading branch information
hawkw committed Jun 6, 2022
1 parent b8a4f5b commit 9754ecf
Showing 1 changed file with 200 additions and 129 deletions.
Loading

0 comments on commit 9754ecf

Please sign in to comment.