Track and Verify Backported Fixes
Make provenance explicit
A maintenance team needs to know which fixes reached each supported release. Keep the source commit ID, target branch, resulting commit ID, reason, adaptation details and actual test evidence together in a review record. In scenario A, cherry-pick -x appends the source commit ID to the message for the clean pick. If a conflict occurs, check the resulting message and add provenance manually when necessary. Do not expose private source details outside the authorized project.
Compare patches, not only IDs
The selected fix and backport have different commit IDs. git cherry -v release main shows source-side commits not reachable from release, using a minus sign for a detected equivalent patch and a plus sign when no equivalent is found. In scenario A, gallery is + and fix is -. This reports patch equivalence, not whether a feature is currently present: a later revert can remove it. git patch-id --stable computes a comparison ID from patch input; line numbers and whitespace are ignored, so matching IDs are not proof of behavioral equivalence.
git log -1 --format=%B releasegit cherry -v release maingit show fix-source | git patch-id --stablegit show release | git patch-id --stableVerify the target behavior
In the simple clean backport, the first output field of both patch-id commands matches. In scenario B, the adapted two-day correction has a different patch ID; that is expected and does not invalidate the fix. Inspect the final target file and absence of unrelated changes. For this text-only exercise a content assertion is sufficient; in application work run the target version’s automated tests and relevant compatibility checks.
git show release:notes.txtgit diff --name-status rescue-release releasegit status --shortRecord the outcome
Example review record: source = fix-source resolved to its full ID; target = release; result = release tip ID; scope = notes.txt only; check = Water every 3 days and no gallery.txt; status = local checks passed, release publication not run. Obtain approvals before publishing to a shared release branch. Practice: if the patch matches but the target test fails, do not approve the backport. Investigate compatibility first.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Track and Verify Backported Fixes — knowledge check
Reason about selective integration and backport verification.
What does -x add for a clean pick?
What does minus in git cherry indicate?
Does a matching stable patch ID prove behavior?
What if an adapted fix has a different patch ID?
Which evidence supports backport approval?