git review
- We can optionally pass the parameter ``-t my_topic`` to set a topic in
- Gerrit. Useful when we have related patches to organize in one topic.
+ We can optionally pass the parameter ``-t my_topic`` to set a
+ :ref:`topic <gerrit-topics>` in
+ Gerrit. Useful when we have related patches to organize in one
+ :ref:`topic <gerrit-topics>`.
Once pushed we should see some output in the terminal as described in
:ref:`Gerrit Push Output <gerrit-push-output>`.
:name: dco
Refer to https://developercertificate.org/ for original text.
+
+.. _gerrit-topics:
+
+Gerrit Topics
+-------------
+
+Topics are useful as a search criteria in Gerrit. By entering ``topic:foo``
+as a search criteria we can track related commits. Use one of the following
+methods to configure topics:
+
+1. Directly in the Gerrit UI via the Edit Topic button
+2. Via ``git review`` using the ``-t topic`` parameter
+
+ .. note::
+
+ git-review defaults to the local branch name as the topic if it does not
+ match the upstream branch.
+
+3. Via ``git push`` using one of the following methods:
+
+ .. code-block:: bash
+
+ git push origin HEAD:refs/for/master%topic=some-topic
+ git push origin HEAD:refs/for/master -o topic=some-topic
+
+ Both methods achieve the same result so is up to preference. Further
+ documentation available at `Gerrit Topics
+ <https://gerrit-review.googlesource.com/Documentation/intro-user.html#topics>`_.