]> git.ipfire.org Git - thirdparty/patchwork.git/commit
Correctly append tags on patches without commit details
authorStephen Finucane <stephen@that.guru>
Tue, 24 Jan 2023 23:31:22 +0000 (23:31 +0000)
committerStephen Finucane <stephen@that.guru>
Wed, 25 Jan 2023 18:11:26 +0000 (18:11 +0000)
commitf23e7fe72ba5b7625fa0155266b4372419f385a8
treea4b837a8a588250dc38b37bd98155adcb3f38d6e
parent9d71ee7592e1e6c2ba779d1d2f4d7d21ee21783a
Correctly append tags on patches without commit details

Only a commit summary (a.k.a. patch subject) is necessary in Git: we
don't need details. The regex we were using to search for postscripts
however assumed that there would be _something_ before the postscript,
resulting in a newline. This wasn't the case. Correct this assumption by
instead using 're.MULTILINE' and matching on '^' and '$' for newlines
instead of '\n'.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Closes: #516
Cc: siddhesh@gotplt.org
(cherry picked from commit 05da32fef9140412bf0e822ce7f9706cb8aa7b5b)
patchwork/tests/views/test_utils.py
patchwork/views/utils.py