mirror of
https://github.com/jj-vcs/jj.git
synced 2025-12-23 06:01:01 +00:00
The 'gerrit upload' cli command is meant to support uploading commits that have an explicit "Change-Id: ..." footer, and those that don't. In the latter case, a temporary copy of the commit being uploaded will be created, with the Change-Id set based on the jj change id. Prior to this commit, there was a bug in this implementation when a chain of commits contained some with Change-Id footers and some without. Say we have commits a->b->c, where b has no Change-Id footer but c does (this case is what's now tested in the test_gerrit_upload_local case). The old logic would: - create a new version of b (let's call it b*), with a CommitId footer, and populate the 'old_to_new' map with 'b -> b*' - not create a new version of c, and populate the 'old_to_new' map with 'c -> c' - push the 'new' version of c, which is c itself. However, c has b as a parent, not b*, so this fails to send to gerrit because b has no Commit-Id footer! After this commit, we create a new temporary commit if either the description is changed (as before), or if any parents are different from the original commit's parents. This does not change the behavior for either the all-explicit or all-implicit ChangeId cases, but fixes the behavior in this mixed case. |
||
|---|---|---|
| .. | ||
| examples | ||
| src | ||
| testing | ||
| tests | ||
| build.rs | ||
| Cargo.toml | ||
| docs | ||
| LICENSE | ||