]> git.ipfire.org Git - thirdparty/patchwork.git/commit
views: don't duplicate tags in patch message when generating mbox
authorAndrew Donnellan <andrew.donnellan@au1.ibm.com>
Wed, 23 Nov 2016 07:01:31 +0000 (18:01 +1100)
committerStephen Finucane <stephen@that.guru>
Thu, 24 Nov 2016 20:14:27 +0000 (20:14 +0000)
commit2941d6f47fd242d53c52e966501fb09e2eb19473
tree49beb7ab4b6e3c376923f2ebfa7929ffed42347b
parent12e9788dcfb8a757498de230beeb87c2ee92d65b
views: don't duplicate tags in patch message when generating mbox

When generating an mbox for a patch with tags in the original commit
message, e.g.:

    Example patch

    This patch is awesome!

Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Acked-by: Russell Currey <ruscur@russell.cc>
the tags from the original email are duplicated:

    Example patch

    This patch is awesome!

Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Acked-by: Russell Currey <ruscur@russell.cc>
Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Acked-by: Russell Currey <ruscur@russell.cc>
It appears that during the refactoring in ef56359fb776 ("models: Merge
patch and first comment"), we added a call to patch.patch_responses() to
extract the tags from the initial patch email, which we then append to the
patch email body... which already has the tags in it.

Remove the unnecessary append of patch.patch_responses when generating an
mbox.

Fixes: ef56359fb776 ("models: Merge patch and first comment")
Reported-by: Russell Currey <ruscur@russell.cc>
Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Reviewed-by: Daniel Axtens <dja@axtens.net>
Reviewed-by: Stephen Finucane <stephen@that.guru>
patchwork/views/__init__.py