Repository navigation
Commit 77fe11d
committed
fix(config): let a global opt-out reach a repo-loaded config
Toggling Refine (or Annotations, or the metadata pass) off in the app
stuck for as long as no repository was loaded, then silently flipped
back on. The app writes only the global config, but a config loaded
from a repo directory merged the two enable flags with OR — and those
flags are plain bools defaulting to true, so a repo that never mentions
refinement contributes true and the global false can never win. Every
repo without a .diffcore.toml hit this, which is most of them.
Merge with AND instead: these passes cost the user money, so either side
may switch one off and neither can force it back on. A repo opting out
still wins, which it did before. annotations_enabled was not merged at
all, leaving its toggle equally stuck, so it joins the other two.1 parent 0b037cb commit 77fe11d
1 file changed
Lines changed: 30 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
665 | 665 | | |
666 | 666 | | |
667 | 667 | | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
668 | 676 | | |
669 | 677 | | |
670 | 678 | | |
| |||
678 | 686 | | |
679 | 687 | | |
680 | 688 | | |
| 689 | + | |
| 690 | + | |
681 | 691 | | |
682 | | - | |
| 692 | + | |
683 | 693 | | |
684 | 694 | | |
685 | 695 | | |
| |||
699 | 709 | | |
700 | 710 | | |
701 | 711 | | |
702 | | - | |
| 712 | + | |
703 | 713 | | |
704 | 714 | | |
705 | 715 | | |
| |||
903 | 913 | | |
904 | 914 | | |
905 | 915 | | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
906 | 934 | | |
907 | 935 | | |
908 | 936 | | |
| |||
0 commit comments