File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed
Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -221,6 +221,8 @@ static void cleanup_subject(struct strbuf *subject)
221221{
222222 char * pos ;
223223 size_t remove ;
224+ int brackets_removed = 0 ;
225+
224226 while (subject -> len ) {
225227 switch (* subject -> buf ) {
226228 case 'r' : case 'R' :
@@ -235,10 +237,15 @@ static void cleanup_subject(struct strbuf *subject)
235237 strbuf_remove (subject , 0 , 1 );
236238 continue ;
237239 case '[' :
240+ /* remove only one set of square brackets */
241+ if (brackets_removed )
242+ break ;
243+
238244 if ((pos = strchr (subject -> buf , ']' ))) {
239245 remove = pos - subject -> buf ;
240246 if (remove <= (subject -> len - remove ) * 2 ) {
241247 strbuf_remove (subject , 0 , remove + 1 );
248+ brackets_removed = 1 ;
242249 continue ;
243250 }
244251 } else
Original file line number Diff line number Diff line change 11Author: Dmitriy Blinov
22Email: bda@mnsspb.ru
3- Subject: Изменён список пакетов необходимых для сборки
3+ Subject: [Navy-patches] Изменён список пакетов необходимых для сборки
44Date: Wed, 12 Nov 2008 17:54:41 +0300
55
Original file line number Diff line number Diff line change @@ -514,7 +514,7 @@ MIME-Version: 1.0
514514Content-Type : text/plain;
515515 charset=utf-8
516516Content-Transfer-Encoding : 8bit
517- Subject : [Navy-patches ] [PATCH ]
517+ Subject : [PATCH ] [Navy-patches ]
518518 =?utf-8?b?0JjQt9C80LXQvdGR0L0g0YHQv9C40YHQvtC6INC/0LA=?=
519519 =?utf-8?b?0LrQtdGC0L7QsiDQvdC10L7QsdGF0L7QtNC40LzRi9GFINC00LvRjyA=?=
520520 =?utf-8?b?0YHQsdC+0YDQutC4?=
You can’t perform that action at this time.
0 commit comments