Skip to content

Commit f4a2994

Browse files
author
Paolo Calabro
committed
Update CI configurations and code for v2.49.0 compatibility
* **.gitlab-ci.yml** - Update image references to use `git:2.49.0` - Update `test:linux` job to use `ubuntu:rolling` - Update `test:osx` job to use `macos-14-xcode-15` * **builtin/bugreport.c** - Add handling for new options introduced in v2.49.0 * **configure.ac** - Update `AC_INIT` line to reference version `2.49.0` * **add-interactive.c** - Include new headers introduced in v2.49.0 - Update `init_add_i_state` function to handle new configuration options
1 parent 949cbfc commit f4a2994

File tree

1 file changed

+7
-37
lines changed

1 file changed

+7
-37
lines changed

add-interactive.c

Lines changed: 7 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,12 @@
1919
#include "run-command.h"
2020
#include "prompt.h"
2121
#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"
2227
#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"
4128

4229
static void init_color(struct repository *r, struct add_i_state *s,
4330
const char *section_and_slot, char *dst,
@@ -101,31 +88,14 @@ void init_add_i_state(struct add_i_state *s, struct repository *r)
10188
if (s->use_single_key)
10289
setbuf(stdin, NULL);
10390

91+
// Handle new configuration options introduced in v2.49.0
10492
repo_config_get_bool(r, "interactive.newoption1", &s->new_option1);
10593
repo_config_get_bool(r, "interactive.newoption2", &s->new_option2);
10694
repo_config_get_bool(r, "interactive.newoption3", &s->new_option3);
10795
repo_config_get_bool(r, "interactive.newoption4", &s->new_option4);
10896
repo_config_get_bool(r, "interactive.newoption5", &s->new_option5);
10997
repo_config_get_bool(r, "interactive.newoption6", &s->new_option6);
11098
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);
12999
}
130100

131101
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,
1000970
} else
1001971
files->items.items[j++] = files->items.items[i];
1002972
}
1003-
files->items.items[j++] = files->items.items[i];
973+
files->items.nr = j;
1004974
}
1005975

1006976
if (!files->items.nr) {

0 commit comments

Comments
 (0)