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)
221
221
{
222
222
char * pos ;
223
223
size_t remove ;
224
+ int brackets_removed = 0 ;
225
+
224
226
while (subject -> len ) {
225
227
switch (* subject -> buf ) {
226
228
case 'r' : case 'R' :
@@ -235,10 +237,15 @@ static void cleanup_subject(struct strbuf *subject)
235
237
strbuf_remove (subject , 0 , 1 );
236
238
continue ;
237
239
case '[' :
240
+ /* remove only one set of square brackets */
241
+ if (brackets_removed )
242
+ break ;
243
+
238
244
if ((pos = strchr (subject -> buf , ']' ))) {
239
245
remove = pos - subject -> buf ;
240
246
if (remove <= (subject -> len - remove ) * 2 ) {
241
247
strbuf_remove (subject , 0 , remove + 1 );
248
+ brackets_removed = 1 ;
242
249
continue ;
243
250
}
244
251
} else
Original file line number Diff line number Diff line change 1
1
Author: Dmitriy Blinov
2
2
3
- Subject: Изменён список пакетов необходимых для сборки
3
+ Subject: [Navy-patches] Изменён список пакетов необходимых для сборки
4
4
Date: Wed, 12 Nov 2008 17:54:41 +0300
5
5
Original file line number Diff line number Diff line change @@ -514,7 +514,7 @@ MIME-Version: 1.0
514
514
Content-Type : text/plain;
515
515
charset=utf-8
516
516
Content-Transfer-Encoding : 8bit
517
- Subject : [Navy-patches ] [PATCH ]
517
+ Subject : [PATCH ] [Navy-patches ]
518
518
=?utf-8?b?0JjQt9C80LXQvdGR0L0g0YHQv9C40YHQvtC6INC/0LA=?=
519
519
=?utf-8?b?0LrQtdGC0L7QsiDQvdC10L7QsdGF0L7QtNC40LzRi9GFINC00LvRjyA=?=
520
520
=?utf-8?b?0YHQsdC+0YDQutC4?=
You can’t perform that action at this time.
0 commit comments