|
19 | 19 | #include "run-command.h" |
20 | 20 | #include "prompt.h" |
21 | 21 | #include "tree.h" |
| 22 | +#include "new-header1.h" |
| 23 | +#include "new-header2.h" |
| 24 | +#include "new-header3.h" |
| 25 | +#include "new-header4.h" |
| 26 | +#include "new-header5.h" |
22 | 27 | #include "new-header7.h" |
23 | | -#include "new-header8.h" |
24 | | -#include "new-header9.h" |
25 | | -#include "new-header10.h" |
26 | | -#include "new-header11.h" |
27 | | -#include "new-header12.h" |
28 | | -#include "new-header13.h" |
29 | | -#include "new-header14.h" |
30 | | -#include "new-header15.h" |
31 | | -#include "new-header16.h" |
32 | | -#include "new-header17.h" |
33 | | -#include "new-header18.h" |
34 | | -#include "new-header19.h" |
35 | | -#include "new-header20.h" |
36 | | -#include "new-header21.h" |
37 | | -#include "new-header22.h" |
38 | | -#include "new-header23.h" |
39 | | -#include "new-header24.h" |
40 | | -#include "new-header25.h" |
41 | 28 |
|
42 | 29 | static void init_color(struct repository *r, struct add_i_state *s, |
43 | 30 | const char *section_and_slot, char *dst, |
@@ -101,31 +88,14 @@ void init_add_i_state(struct add_i_state *s, struct repository *r) |
101 | 88 | if (s->use_single_key) |
102 | 89 | setbuf(stdin, NULL); |
103 | 90 |
|
| 91 | + // Handle new configuration options introduced in v2.49.0 |
104 | 92 | repo_config_get_bool(r, "interactive.newoption1", &s->new_option1); |
105 | 93 | repo_config_get_bool(r, "interactive.newoption2", &s->new_option2); |
106 | 94 | repo_config_get_bool(r, "interactive.newoption3", &s->new_option3); |
107 | 95 | repo_config_get_bool(r, "interactive.newoption4", &s->new_option4); |
108 | 96 | repo_config_get_bool(r, "interactive.newoption5", &s->new_option5); |
109 | 97 | repo_config_get_bool(r, "interactive.newoption6", &s->new_option6); |
110 | 98 | repo_config_get_bool(r, "interactive.newoption7", &s->new_option7); |
111 | | - repo_config_get_bool(r, "interactive.newoption8", &s->new_option8); |
112 | | - repo_config_get_bool(r, "interactive.newoption9", &s->new_option9); |
113 | | - repo_config_get_bool(r, "interactive.newoption10", &s->new_option10); |
114 | | - repo_config_get_bool(r, "interactive.newoption11", &s->new_option11); |
115 | | - repo_config_get_bool(r, "interactive.newoption12", &s->new_option12); |
116 | | - repo_config_get_bool(r, "interactive.newoption13", &s->new_option13); |
117 | | - repo_config_get_bool(r, "interactive.newoption14", &s->new_option14); |
118 | | - repo_config_get_bool(r, "interactive.newoption15", &s->new_option15); |
119 | | - repo_config_get_bool(r, "interactive.newoption16", &s->new_option16); |
120 | | - repo_config_get_bool(r, "interactive.newoption17", &s->new_option17); |
121 | | - repo_config_get_bool(r, "interactive.newoption18", &s->new_option18); |
122 | | - repo_config_get_bool(r, "interactive.newoption19", &s->new_option19); |
123 | | - repo_config_get_bool(r, "interactive.newoption20", &s->new_option20); |
124 | | - repo_config_get_bool(r, "interactive.newoption21", &s->new_option21); |
125 | | - repo_config_get_bool(r, "interactive.newoption22", &s->new_option22); |
126 | | - repo_config_get_bool(r, "interactive.newoption23", &s->new_option23); |
127 | | - repo_config_get_bool(r, "interactive.newoption24", &s->new_option24); |
128 | | - repo_config_get_bool(r, "interactive.newoption25", &s->new_option25); |
129 | 99 | } |
130 | 100 |
|
131 | 101 | void clear_add_i_state(struct add_i_state *s) |
@@ -1000,7 +970,7 @@ static int run_patch(struct add_i_state *s, const struct pathspec *ps, |
1000 | 970 | } else |
1001 | 971 | files->items.items[j++] = files->items.items[i]; |
1002 | 972 | } |
1003 | | - files->items.items[j++] = files->items.items[i]; |
| 973 | + files->items.nr = j; |
1004 | 974 | } |
1005 | 975 |
|
1006 | 976 | if (!files->items.nr) { |
|
0 commit comments