Commit 2639772
get_maintainer: remove stray punctuation when cleaning file emails
When parsing emails from .yaml files in particular, stray punctuation
such as a leading '-' can end up in the name. For example, consider a
common YAML section such as:
maintainers:
- devicetree@vger.kernel.org
This would previously be processed by get_maintainer.pl as:
- <devicetree@vger.kernel.org>
Make the logic in clean_file_emails more robust by deleting any
sub-names which consist of common single punctuation marks before
proceeding to the best-effort name extraction logic. The output is then
correct:
devicetree@vger.kernel.org
Some additional comments are added to the function to make things
clearer to future readers.
Link: https://lore.kernel.org/all/0173e76a36b3a9b4e7f324dd3a36fd4a9757f302.camel@perches.com/
Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Alvin Šipraga <alsi@bang-olufsen.dk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>1 parent 9c334eb commit 2639772
1 file changed
Lines changed: 11 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2462 | 2462 | | |
2463 | 2463 | | |
2464 | 2464 | | |
2465 | | - | |
2466 | | - | |
2467 | | - | |
2468 | 2465 | | |
| 2466 | + | |
| 2467 | + | |
| 2468 | + | |
| 2469 | + | |
2469 | 2470 | | |
| 2471 | + | |
| 2472 | + | |
| 2473 | + | |
| 2474 | + | |
| 2475 | + | |
2470 | 2476 | | |
2471 | 2477 | | |
2472 | 2478 | | |
| |||
2480 | 2486 | | |
2481 | 2487 | | |
2482 | 2488 | | |
| 2489 | + | |
| 2490 | + | |
2483 | 2491 | | |
2484 | 2492 | | |
2485 | 2493 | | |
2486 | 2494 | | |
2487 | | - | |
2488 | | - | |
2489 | 2495 | | |
2490 | 2496 | | |
2491 | 2497 | | |
2492 | 2498 | | |
2493 | | - | |
2494 | | - | |
2495 | 2499 | | |
2496 | 2500 | | |
2497 | 2501 | | |
| |||
0 commit comments