From f5025fbb1b593a49484354bac45c8e7283b32234 Mon Sep 17 00:00:00 2001 From: Andreas Gruenbacher Date: Sun, 29 Jan 2006 23:26:38 +0000 Subject: - Also strip any bracketed fields and Re:, Fwd:, Fw:, Aw: from subject headers. --- po/de.po | 10 +++++----- po/fr.po | 10 +++++----- po/ja.po | 10 +++++----- po/quilt.pot | 10 +++++----- quilt.changes | 5 +++-- quilt/mail.in | 4 +++- test/mail.test | 2 +- 7 files changed, 27 insertions(+), 24 deletions(-) diff --git a/po/de.po b/po/de.po index 8c329ac..9125e89 100644 --- a/po/de.po +++ b/po/de.po @@ -781,23 +781,23 @@ msgid "Could not determine the envelope sender address. Please use --sender." msgstr "" "Konnte die Envelope-Adresse nicht feststellen. Bitte verwenden Sie --sender." -#: quilt/mail.in:296 +#: quilt/mail.in:298 msgid "Unable to extract a subject header from %s\\n" msgstr "Konnte keine Subject-Kopfzeile aus %s extrahieren\\n" -#: quilt/mail.in:309 +#: quilt/mail.in:311 msgid "Patches %s have duplicate subject headers.\\n" msgstr "Die Patches %s haben die selben Subject-Kopfzeilen.\\n" -#: quilt/mail.in:351 +#: quilt/mail.in:353 msgid "Introduction has no subject header (saved as %s)\\n" msgstr "Die Einleitung hat keine Subject-Kopfzeile (gespeichert als %s)\\n" -#: quilt/mail.in:354 +#: quilt/mail.in:356 msgid "Introduction has no subject header\\n" msgstr "Die Einleitung hat keine Subject-Kopfzeile\\n" -#: quilt/mail.in:441 +#: quilt/mail.in:443 msgid "Introduction saved as %s\\n" msgstr "Einleitung gespeichert als %s\\n" diff --git a/po/fr.po b/po/fr.po index 5ed50c5..2818440 100644 --- a/po/fr.po +++ b/po/fr.po @@ -776,23 +776,23 @@ msgstr "" msgid "Could not determine the envelope sender address. Please use --sender." msgstr "Impossible de dterminer l'adresse d'expditeur. Utilisez --sender." -#: quilt/mail.in:296 +#: quilt/mail.in:298 msgid "Unable to extract a subject header from %s\\n" msgstr "" -#: quilt/mail.in:309 +#: quilt/mail.in:311 msgid "Patches %s have duplicate subject headers.\\n" msgstr "" -#: quilt/mail.in:351 +#: quilt/mail.in:353 msgid "Introduction has no subject header (saved as %s)\\n" msgstr "" -#: quilt/mail.in:354 +#: quilt/mail.in:356 msgid "Introduction has no subject header\\n" msgstr "" -#: quilt/mail.in:441 +#: quilt/mail.in:443 msgid "Introduction saved as %s\\n" msgstr "" diff --git a/po/ja.po b/po/ja.po index 3616c85..8d2342b 100644 --- a/po/ja.po +++ b/po/ja.po @@ -754,23 +754,23 @@ msgstr "" "エンベロープの送信者アドレスを確定できませんでした。--senderオプション\n" "を使用してください。" -#: quilt/mail.in:296 +#: quilt/mail.in:298 msgid "Unable to extract a subject header from %s\\n" msgstr "" -#: quilt/mail.in:309 +#: quilt/mail.in:311 msgid "Patches %s have duplicate subject headers.\\n" msgstr "" -#: quilt/mail.in:351 +#: quilt/mail.in:353 msgid "Introduction has no subject header (saved as %s)\\n" msgstr "" -#: quilt/mail.in:354 +#: quilt/mail.in:356 msgid "Introduction has no subject header\\n" msgstr "" -#: quilt/mail.in:441 +#: quilt/mail.in:443 msgid "Introduction saved as %s\\n" msgstr "" diff --git a/po/quilt.pot b/po/quilt.pot index cf770ca..68b653c 100644 --- a/po/quilt.pot +++ b/po/quilt.pot @@ -516,23 +516,23 @@ msgstr "" msgid "Could not determine the envelope sender address. Please use --sender." msgstr "" -#: quilt/mail.in:296 +#: quilt/mail.in:298 msgid "Unable to extract a subject header from %s\\n" msgstr "" -#: quilt/mail.in:309 +#: quilt/mail.in:311 msgid "Patches %s have duplicate subject headers.\\n" msgstr "" -#: quilt/mail.in:351 +#: quilt/mail.in:353 msgid "Introduction has no subject header (saved as %s)\\n" msgstr "" -#: quilt/mail.in:354 +#: quilt/mail.in:356 msgid "Introduction has no subject header\\n" msgstr "" -#: quilt/mail.in:441 +#: quilt/mail.in:443 msgid "Introduction saved as %s\\n" msgstr "" diff --git a/quilt.changes b/quilt.changes index bb6cdf2..51c8c7a 100644 --- a/quilt.changes +++ b/quilt.changes @@ -1,7 +1,8 @@ ------------------------------------------------------------------- -Sun Jan 29 23:26:27 CET 2006 - agruen@suse.de +Mon Jan 30 00:22:24 CET 2006 - agruen@suse.de -- Also strip any literal "[patch]" from subject headers. +- Also strip any bracketed fields and Re:, Fwd:, Fw:, Aw: from + subject headers. ------------------------------------------------------------------- Sun Jan 29 22:46:14 CET 2006 - agruen@suse.de diff --git a/quilt/mail.in b/quilt/mail.in index 1707b34..4e74f21 100644 --- a/quilt/mail.in +++ b/quilt/mail.in @@ -257,7 +257,9 @@ if [ "$(type -t quilt_mail_patch_filter 2> /dev/null)" != function ]; then return 1 fi - mh[0]=$(echo "${mh[0]}" | sed -e $'s/\\[patch\\][ \t]*//i') + mh[0]=$(echo "${mh[0]}" \ + | sed -e $'s/\\[[^]]*\\][ \t]*//gi' \ + -e $'s/\<\(fwd:\|fw:\|re:\|aw:\)[ \t]//gi') # Add recipients defined by some recognized keywords local saved_IFS=$IFS; IFS=$'\n' diff --git a/test/mail.test b/test/mail.test index 80cc3e9..4f6ee80 100644 --- a/test/mail.test +++ b/test/mail.test @@ -57,7 +57,7 @@ > Patches 1.diff, 5.diff have duplicate subject headers. $ cat /dev/stdin no-subject > patches/5.diff - < [patch] Subject of 5.diff + < Aw: [patch] Fwd: Re: [patch 5/7] Fw: Subject of 5.diff < $ quilt mail --mbox mbox --prefix "test" --subject "This is a test" -m "Message" -- cgit