-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
A-infrastructureArea: infrastructure around the cargo repo, ci, releases, etc.Area: infrastructure around the cargo repo, ci, releases, etc.E-easyExperience: EasyExperience: EasyS-acceptedStatus: Issue or feature is accepted, and has a team member available to help mentor or reviewStatus: Issue or feature is accepted, and has a team member available to help mentor or review
Description
The check-version-bump
check generates an error in the following case:
- Contributor creates a branch.
- Some PR merges that modifies a crate, for example bumping cargo-credential's version number.
- Contributor submits their PR, where its base is before step 2 is merged.
This causes an error like:
BumpCheck base commit `819fa73b2dd86e32bf01a7317aec0fa0a447c871`
BumpCheck head commit `c9262bd58021cd3bcca101f68bc3a9efbb57cb70`
BumpCheck compare against `crates-io`
Updating crates.io index
BumpCheck compare against `9c4383fb55986096b414d98125421ab87b5fd642`
error: Detected changes in these crates but no version bump found:
cargo-credential@0.4.0
cargo-credential-1password@0.4.0
I think the issue is that the diff is not using a "symmetric difference" between base and head. In the example above, base is the latest master (with the changes to cargo-credential) and head is the tip of my branch (which is missing those changes). The check is doing the equivalent of git diff 819fa73b2dd86e32bf01a7317aec0fa0a447c871 c9262bd58021cd3bcca101f68bc3a9efbb57cb70
, which pulls in all changes that have happened on master since the branch was created. I think a solution is to use a symmetric diff (with git's ...
syntax), but AFAIK libgit2 does not support that. So I'm not sure how to solve this.
Metadata
Metadata
Assignees
Labels
A-infrastructureArea: infrastructure around the cargo repo, ci, releases, etc.Area: infrastructure around the cargo repo, ci, releases, etc.E-easyExperience: EasyExperience: EasyS-acceptedStatus: Issue or feature is accepted, and has a team member available to help mentor or reviewStatus: Issue or feature is accepted, and has a team member available to help mentor or review