Commit 7cd07f1
autocorrect: provide config resolution API
Add autocorrect_resolve(). This resolves and populates the correct
values for autocorrect config.
Make autocorrect config callback internal. The API is meant to provide
a high-level way to retrieve the config. Allowing access to the config
callback from outside violates that intent.
Additionally, in some cases, without access to the config callback, two
config iterations cannot be merged into one, which can hurt performance.
This is fine, as the code path that calls autocorrect_resolve() is cold.
Signed-off-by: Jiamu Sun <39@barroit.sh>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent f06f1f0 commit 7cd07f1
3 files changed
Lines changed: 30 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
3 | 5 | | |
| |||
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
32 | | - | |
33 | | - | |
| 34 | + | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
38 | | - | |
| 40 | + | |
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| |||
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
56 | 65 | | |
57 | 66 | | |
58 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | 4 | | |
7 | 5 | | |
8 | 6 | | |
| |||
16 | 14 | | |
17 | 15 | | |
18 | 16 | | |
19 | | - | |
20 | | - | |
| 17 | + | |
21 | 18 | | |
22 | 19 | | |
23 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
537 | 537 | | |
538 | 538 | | |
539 | 539 | | |
540 | | - | |
541 | | - | |
542 | | - | |
543 | | - | |
544 | | - | |
545 | | - | |
546 | | - | |
547 | | - | |
| 540 | + | |
| 541 | + | |
548 | 542 | | |
549 | | - | |
| 543 | + | |
550 | 544 | | |
551 | 545 | | |
552 | 546 | | |
553 | | - | |
554 | | - | |
555 | | - | |
556 | 547 | | |
557 | 548 | | |
558 | 549 | | |
559 | 550 | | |
560 | 551 | | |
561 | | - | |
| 552 | + | |
562 | 553 | | |
563 | 554 | | |
564 | 555 | | |
565 | | - | |
| 556 | + | |
566 | 557 | | |
567 | 558 | | |
568 | 559 | | |
| |||
599 | 590 | | |
600 | 591 | | |
601 | 592 | | |
602 | | - | |
| 593 | + | |
| 594 | + | |
603 | 595 | | |
604 | 596 | | |
605 | 597 | | |
606 | 598 | | |
607 | 599 | | |
608 | | - | |
| 600 | + | |
609 | 601 | | |
610 | | - | |
| 602 | + | |
611 | 603 | | |
612 | 604 | | |
613 | 605 | | |
614 | 606 | | |
615 | 607 | | |
616 | 608 | | |
617 | | - | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
618 | 613 | | |
619 | 614 | | |
620 | 615 | | |
| |||
674 | 669 | | |
675 | 670 | | |
676 | 671 | | |
677 | | - | |
| 672 | + | |
678 | 673 | | |
679 | 674 | | |
680 | 675 | | |
681 | 676 | | |
682 | | - | |
683 | | - | |
| 677 | + | |
684 | 678 | | |
685 | 679 | | |
686 | | - | |
| 680 | + | |
687 | 681 | | |
688 | | - | |
| 682 | + | |
689 | 683 | | |
690 | 684 | | |
691 | 685 | | |
| |||
0 commit comments