Preferred approach to backporting a group of patches in Gerrit

Caolán McNamara caolan.mcnamara at collabora.com
Mon Nov 27 15:24:58 UTC 2023


On Mon, 2023-11-27 at 09:31 -0500, Patrick Luby wrote:
> So I have committed two patches in master that, together, fix one bug
> and I would like to backport these two commits to libreoffice-7-6.
> 
> My question is which of the following is the preferred approach:
> 
> 1. Cherry-pick both patches separately marshalling each separately 
> through the review process
> 2. Manually create a new combined patch with a commit message
> referring to the two original commits

I generally go with option 2. Typically cherry-pick them locally to the
branch I want them in, git rebase -i, s to squash the dependants into
the parent, add a bit of text about the overall issue, leave the two
commit messages and review links so each bit can be read separately at
the original gerrit review.

FWIW gerrit uses the last Change-Id line it sees as the identifier to
link the new review to an old review in the UI.


More information about the LibreOffice mailing list