forked from auracaster/openocd
HACKING: describe keeping the 'Change-Id' on new patch versions
We often get on Gerrit a new version of an old patch with a new 'Change-Id' value. This breaks the history of the review, adding more work to the review process. Describe in HACKING why the hook 'commit-msg' is required and how to handle the 'Change-Id' on new patch versions. Change-Id: I5c060b19f966add7422704912b38e1ab2f788e5f Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8940 Tested-by: jenkins
This commit is contained in:
10
HACKING
10
HACKING
@@ -169,7 +169,9 @@ git remote add review https://USERNAME:PASSWORD@review.openocd.org/p/openocd.git
|
|||||||
Gerrit server, even if you plan to use several local branches for different
|
Gerrit server, even if you plan to use several local branches for different
|
||||||
topics. It is possible because @c for/master is not a traditional Git
|
topics. It is possible because @c for/master is not a traditional Git
|
||||||
branch.
|
branch.
|
||||||
-# You will need to install this hook, we will look into a better solution:
|
-# You will need to install this hook to automatically add the
|
||||||
|
field "Change-Id:" in the commit message, as required by Gerrit.
|
||||||
|
We will look into a better solution:
|
||||||
@code
|
@code
|
||||||
wget https://review.openocd.org/tools/hooks/commit-msg
|
wget https://review.openocd.org/tools/hooks/commit-msg
|
||||||
mv commit-msg .git/hooks
|
mv commit-msg .git/hooks
|
||||||
@@ -246,6 +248,12 @@ doc: fix typos
|
|||||||
@code
|
@code
|
||||||
git pull --rebase origin master
|
git pull --rebase origin master
|
||||||
@endcode
|
@endcode
|
||||||
|
|
||||||
|
-# When you create a new version of an old patch, check that the new patch
|
||||||
|
keeps the same 'Change-Id:' field of the old patch.
|
||||||
|
This allows the Gerrit server to recognize the patch as a new version of
|
||||||
|
the older one and keeps track of the history and the review process.
|
||||||
|
|
||||||
-# Send the patches to the Gerrit server for review:
|
-# Send the patches to the Gerrit server for review:
|
||||||
@code
|
@code
|
||||||
git push review
|
git push review
|
||||||
|
|||||||
Reference in New Issue
Block a user