]> 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>
Tue, 24 Jan 2023 23:45:48 +0000 (23:45 +0000)
commit05da32fef9140412bf0e822ce7f9706cb8aa7b5b
tree9cbeca7ab16814a5ef0301d899e0f545e18edd44
parent8ffbf1ec8939393270e09c1f7c1e3c01d31427b2
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
patchwork/tests/views/test_utils.py
patchwork/views/utils.py