how to change submitted (but not pushed) patches in gerrit when necessary?
nthiebaud at gmail.com
Thu Nov 22 23:53:04 PST 2012
On Fri, Nov 23, 2012 at 1:06 AM, Winfried Donkers
<W.Donkers at dci-electronics.nl> wrote:
> Hi all,
> I submitted a patch to gerrit with logerrit. The reviewer had some comments
> which need alteration of the patch.
> But how to 'resubmit' this changed patch once that is ready?
> All I can find on this area is to use git push […], but I can't/won't push.
> My patches need to be reviewed by sane persons before they are pushed :)
This is how I do it:
When I work, I frist create a branch out of a point in master
(preferably a oen that build nicely :-) )
so nwo I'm on branch 'foo' for example.
I code my patch, then I submity it to gerrit via
git push origin foo:refs/for/master
then I checkout out master again... and keep going...
When the review comes and modification to my patch are needed, I
checkout out the branch foo again...
the I make the modifications and 'amend' the commit (which _is_ the
commit I pushed to gerrit)
and then push it again using the same command.
rince and repeat until the patch is ready...
then I let gerrit cherry pick it on top of master.. if ok, then I can
delete the foo branch locally
if the cherry pick failed because of a conflict... I fetch ./g fetch
and then rebase foo : git rebase origin/master (while being on the foo branch)
since the cherry pick from gerrit failed, that rebase should exibit
some conflict, with I resolve using git mergetool
then one can re-push the patch to gerrit, again using the same command
as above.. rince and repeat until the cherry pick from gerrit works
If one has commit right, then the last phase can be dealt by bringing
the patch to master locally and simply pushing to master
More information about the LibreOffice