Currently publish-crates checks if unpublished changes exist by querying GitHub for the last commit date. This is fine in many cases, but will result in false-positives when Cargo.toml contains an include or exclude field.
Instead of querying GitHub, it could make sense to iterate through the crate directory and call git directly, e.g. with git log -1 --pretty="format:%ct" /path/to/file, to get the change time while skipping over non-included files.
As far as I know cargo metadata doesn't contain include and exclude information, so this would require parsing Cargo.toml for those keys.
Currently
publish-crateschecks if unpublished changes exist by querying GitHub for the last commit date. This is fine in many cases, but will result in false-positives whenCargo.tomlcontains anincludeorexcludefield.Instead of querying GitHub, it could make sense to iterate through the crate directory and call git directly, e.g. with
git log -1 --pretty="format:%ct" /path/to/file, to get the change time while skipping over non-included files.As far as I know
cargo metadatadoesn't containincludeandexcludeinformation, so this would require parsingCargo.tomlfor those keys.