Skip to content

Commit

Permalink
[TASK] Add info on common: "Included in", "commit message"
Browse files Browse the repository at this point in the history
This improves the docs and adds references for:

* How to utilize the "Included in" gerrit feature
* How to add a "push message" to gerrit
* Move from t3upgrade -> t3coreapi for a link
  • Loading branch information
garvinhicking committed Nov 11, 2024
1 parent 4450825 commit daee3eb
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 1 deletion.
44 changes: 44 additions & 0 deletions Documentation/CheatSheets/Git.rst
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,35 @@ Other keywords:
* other lines <= 72 chars
* hyperlinks with > 72 chars are allowed when required (:ref:`<commitmessage-links>`)

Workflow - push with Gerrit message
===================================

Due to the nature of the commit workflow with gerrit, and a commit
always getting amended, you have no individual commit messages for one
Gerrit patch set.

To workaround that, you can add small comments to individual patch sets
pushed to Gerrit like this:

.. code-block:: bash
git push origin HEAD:refs/for/main%m=Fixed_issue_in_JavaScript
Since that notation is a bit bland (no spaces, no linebreaks, no special
characters, it can be helpful to utilize a small Bash script:

.. code-block:: bash
:caption: push_with_message.sh
#!/bin/bash
read -p "Please enter pseudo-commit message: " answer
answer=$(echo "$answer" | tr -c '[:alnum:]' '_')
git push origin HEAD:refs/for/main%m=$answer
Replace "main" with possibly other branches (`13.4`, `12.4`, ...) that
you may want to push to.

Workflow - Undoing / fixing things
==================================

Expand Down Expand Up @@ -275,6 +304,21 @@ This is very handy, in case you accidentally created a new commit
instead of adding to an existing commit (with `git commit --amend`). This way,
you can merge the last 2 commits and the commit messages.

.. _cheatsheet-git-included-in:
Information: Where was a patch included?
========================================

Sometimes you see an old gerrit issue that was committed and pushed against
`main`, but wonder in which TYPO3 version it was included. Often, you can
already deduce from a `Releases: main, 12.4` line that it was committed when
`13.4` was `main`. But if you only see `Releases: main` you might begin to look
up the date of a patch and relate it to release dates, or begin to inspect the
git repository manually.

But: Hold on! Just check out the Gerrit interface and on the top right you see
the menu, from where you also cherry-pick a patch or download a patch. There's
a menu entry :guilabel:`Included in` which will reveal all TYPO3 releases (via
GIT tags), a patch was included in.

References
==========
Expand Down
7 changes: 7 additions & 0 deletions Documentation/CoreMergers/Backport.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,10 @@ Edit the commit message to comply to the guidelines again. (e.g. remove the Revi
Push the review back to Gerrit.

On Gerrit the original patch will show the cherry-pick as a related patch.

In which TYPO3 release was a patch merged into?
===============================================

See :ref:`<cheatsheet-git-included-in>` for information on how to use the
:guilabel:`Included in` menu button to see, in which TYPO3 releases a patch
was merged into.
2 changes: 1 addition & 1 deletion Documentation/HandlingIssues/TicketWorkflow.rst
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ Status

The upside: The patch that has been made may apply to your own instance.
You can always download patches and apply them locally, see
:ref:`Applying Core patches <t3upgrade:applying-core-patches>` for details.
:ref:`Applying Core patches <t3coreapi:applying-core-patches>` for details.

#. Closed

Expand Down
7 changes: 7 additions & 0 deletions Documentation/Troubleshooting/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -304,3 +304,10 @@ re-create the assets using the following workflow:
You will see the Commit Message again and you can now save it.
When you push this change, it will create a new Patchset - this is expected behavior.

In which TYPO3 release was a patch merged into?
-----------------------------------------------

See :ref:`<cheatsheet-git-included-in>` for information on how to use the
:guilabel:`Included in` menu button to see, in which TYPO3 releases a patch
was merged into.

0 comments on commit daee3eb

Please sign in to comment.