Commit 237e520
parseopt: check for duplicate long names and numerical options
We already check for duplicate short names. Check for and report
duplicate long names and numerical options as well.
Perform the slightly expensive string duplicate check only when showing
the usage to keep the cost of normal invocations low. t0012-help.sh
covers it.
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent a5f2ff6 commit 237e520
1 file changed
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
634 | 635 | | |
635 | 636 | | |
636 | 637 | | |
| 638 | + | |
637 | 639 | | |
638 | 640 | | |
639 | 641 | | |
| |||
648 | 650 | | |
649 | 651 | | |
650 | 652 | | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
651 | 658 | | |
652 | 659 | | |
653 | 660 | | |
| |||
707 | 714 | | |
708 | 715 | | |
709 | 716 | | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
710 | 731 | | |
711 | 732 | | |
712 | 733 | | |
| |||
1324 | 1345 | | |
1325 | 1346 | | |
1326 | 1347 | | |
| 1348 | + | |
| 1349 | + | |
1327 | 1350 | | |
1328 | 1351 | | |
1329 | 1352 | | |
| |||
0 commit comments