Commit dcecac2
committed
config: do not use strbuf_split()
When parsing an old-style GIT_CONFIG_PARAMETERS environment
variable, the code parses key=value pairs by splitting them at '='
into an array of strbuf's. As strbuf_split() leaves the delimiter
at the end of the split piece, the code has to manually trim it.
If we split with string_list_split(), that becomes unnecessary.
Retire the use of strbuf_split() from this code path.
Note that the max parameter of string_list_split() is of
an ergonomically iffy design---it specifies the maximum number of
times the function is allowed to split, which means that in order to
split a text into up to 2 pieces, you have to pass 1, not 2.
Signed-off-by: Junio C Hamano <[email protected]>1 parent 566e910 commit dcecac2
1 file changed
+10
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
638 | 638 | | |
639 | 639 | | |
640 | 640 | | |
641 | | - | |
| 641 | + | |
642 | 642 | | |
643 | 643 | | |
644 | 644 | | |
645 | 645 | | |
646 | 646 | | |
647 | | - | |
648 | | - | |
| 647 | + | |
| 648 | + | |
649 | 649 | | |
650 | 650 | | |
651 | | - | |
652 | | - | |
653 | | - | |
654 | | - | |
| 651 | + | |
655 | 652 | | |
656 | | - | |
| 653 | + | |
| 654 | + | |
657 | 655 | | |
658 | | - | |
659 | | - | |
660 | | - | |
| 656 | + | |
| 657 | + | |
661 | 658 | | |
662 | 659 | | |
663 | 660 | | |
664 | | - | |
665 | | - | |
| 661 | + | |
| 662 | + | |
666 | 663 | | |
667 | 664 | | |
668 | 665 | | |
| |||
0 commit comments