Commit 06eb708
config: always parse GIT_CONFIG_PARAMETERS during git_config
Previously we parsed GIT_CONFIG_PARAMETERS lazily into a
linked list, and then checked that list during future
invocations of git_config. However, that ignores the fact
that the environment variable could change during our run
(e.g., because we parse more "-c" as part of an alias).
Instead, let's just re-parse the environment variable each
time. It's generally not very big, and it's no more work
than parsing the config files, anyway.
As a bonus, we can ditch all of the linked list storage code
entirely, making the code much simpler.
The test unfortunately still does not pass because of an
unrelated bug in handle_options.
Signed-off-by: Jeff King <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>1 parent 5a0c9ee commit 06eb708
2 files changed
+18
-40
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | 23 | | |
33 | 24 | | |
34 | 25 | | |
| |||
48 | 39 | | |
49 | 40 | | |
50 | 41 | | |
51 | | - | |
| 42 | + | |
| 43 | + | |
52 | 44 | | |
53 | | - | |
54 | 45 | | |
55 | 46 | | |
56 | 47 | | |
| |||
60 | 51 | | |
61 | 52 | | |
62 | 53 | | |
63 | | - | |
| 54 | + | |
64 | 55 | | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
70 | 60 | | |
71 | 61 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | 62 | | |
76 | 63 | | |
77 | 64 | | |
78 | | - | |
| 65 | + | |
| 66 | + | |
79 | 67 | | |
80 | 68 | | |
81 | 69 | | |
| |||
93 | 81 | | |
94 | 82 | | |
95 | 83 | | |
96 | | - | |
97 | | - | |
| 84 | + | |
98 | 85 | | |
99 | 86 | | |
100 | 87 | | |
| |||
103 | 90 | | |
104 | 91 | | |
105 | 92 | | |
106 | | - | |
| 93 | + | |
107 | 94 | | |
108 | 95 | | |
109 | 96 | | |
| |||
819 | 806 | | |
820 | 807 | | |
821 | 808 | | |
822 | | - | |
823 | | - | |
824 | | - | |
825 | | - | |
826 | | - | |
827 | | - | |
828 | | - | |
829 | | - | |
830 | | - | |
831 | | - | |
832 | | - | |
833 | | - | |
834 | | - | |
835 | | - | |
836 | | - | |
837 | | - | |
838 | 809 | | |
839 | 810 | | |
840 | 811 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
854 | 854 | | |
855 | 855 | | |
856 | 856 | | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
857 | 864 | | |
0 commit comments