Skip to content

Commit 629659d

Browse files
committed
git: update to v2.29.0
Update to git version v2.29.0, this requires changes for these upstream commits: * dbbcd44fb47347a3fdbee88ea21805b7f4ac0b98 strvec: rename files from argv-array to strvec * 873cd28a8b17ff21908c78c7929a7615f8c94992 argv-array: rename to strvec * d70a9eb611a9d242c1d26847d223b8677609305b strvec: rename struct fields * 6a67c759489e1025665adf78326e9e0d0981bab5 test-lib-functions: restrict test_must_fail usage Signed-off-by: Christian Hesse <[email protected]>
1 parent 205837d commit 629659d

File tree

7 files changed

+36
-36
lines changed

7 files changed

+36
-36
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ htmldir = $(docdir)
1414
pdfdir = $(docdir)
1515
mandir = $(prefix)/share/man
1616
SHA1_HEADER = <openssl/sha.h>
17-
GIT_VER = 2.28.0
17+
GIT_VER = 2.29.0
1818
GIT_URL = https://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.xz
1919
INSTALL = install
2020
COPYTREE = cp -r

cgit.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include <tag.h>
1515
#include <diff.h>
1616
#include <diffcore.h>
17-
#include <argv-array.h>
17+
#include <strvec.h>
1818
#include <refs.h>
1919
#include <revision.h>
2020
#include <log-tree.h>

git

Submodule git updated from 47ae905 to 69986e1

tests/t0109-gitconfig.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ test_no_home_access () {
2525
-E CGIT_CONFIG="$PWD/cgitrc" \
2626
-E QUERY_STRING="url=$1" \
2727
-e access -f -o strace.out cgit &&
28-
test_must_fail grep "$non_existent_path" strace.out
28+
! grep "$non_existent_path" strace.out
2929
}
3030

3131
test_no_home_access_success() {

ui-blame.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include "ui-blame.h"
1111
#include "html.h"
1212
#include "ui-shared.h"
13-
#include "argv-array.h"
13+
#include "strvec.h"
1414
#include "blame.h"
1515

1616

@@ -104,7 +104,7 @@ static void print_object(const struct object_id *oid, const char *path,
104104
enum object_type type;
105105
char *buf;
106106
unsigned long size;
107-
struct argv_array rev_argv = ARGV_ARRAY_INIT;
107+
struct strvec rev_argv = STRVEC_INIT;
108108
struct rev_info revs;
109109
struct blame_scoreboard sb;
110110
struct blame_origin *o;
@@ -124,11 +124,11 @@ static void print_object(const struct object_id *oid, const char *path,
124124
return;
125125
}
126126

127-
argv_array_push(&rev_argv, "blame");
128-
argv_array_push(&rev_argv, rev);
127+
strvec_push(&rev_argv, "blame");
128+
strvec_push(&rev_argv, rev);
129129
init_revisions(&revs, NULL);
130130
revs.diffopt.flags.allow_textconv = 1;
131-
setup_revisions(rev_argv.argc, rev_argv.argv, &revs, NULL);
131+
setup_revisions(rev_argv.nr, rev_argv.v, &revs, NULL);
132132
init_scoreboard(&sb);
133133
sb.revs = &revs;
134134
sb.repo = the_repository;

ui-log.c

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include "ui-log.h"
1111
#include "html.h"
1212
#include "ui-shared.h"
13-
#include "argv-array.h"
13+
#include "strvec.h"
1414

1515
static int files, add_lines, rem_lines, lines_counted;
1616

@@ -366,38 +366,38 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern
366366
{
367367
struct rev_info rev;
368368
struct commit *commit;
369-
struct argv_array rev_argv = ARGV_ARRAY_INIT;
369+
struct strvec rev_argv = STRVEC_INIT;
370370
int i, columns = commit_graph ? 4 : 3;
371371
int must_free_tip = 0;
372372

373373
/* rev_argv.argv[0] will be ignored by setup_revisions */
374-
argv_array_push(&rev_argv, "log_rev_setup");
374+
strvec_push(&rev_argv, "log_rev_setup");
375375

376376
if (!tip)
377377
tip = ctx.qry.head;
378378
tip = disambiguate_ref(tip, &must_free_tip);
379-
argv_array_push(&rev_argv, tip);
379+
strvec_push(&rev_argv, tip);
380380

381381
if (grep && pattern && *pattern) {
382382
pattern = xstrdup(pattern);
383383
if (!strcmp(grep, "grep") || !strcmp(grep, "author") ||
384384
!strcmp(grep, "committer")) {
385-
argv_array_pushf(&rev_argv, "--%s=%s", grep, pattern);
385+
strvec_pushf(&rev_argv, "--%s=%s", grep, pattern);
386386
} else if (!strcmp(grep, "range")) {
387387
char *arg;
388388
/* Split the pattern at whitespace and add each token
389389
* as a revision expression. Do not accept other
390390
* rev-list options. Also, replace the previously
391391
* pushed tip (it's no longer relevant).
392392
*/
393-
argv_array_pop(&rev_argv);
393+
strvec_pop(&rev_argv);
394394
while ((arg = next_token(&pattern))) {
395395
if (*arg == '-') {
396396
fprintf(stderr, "Bad range expr: %s\n",
397397
arg);
398398
break;
399399
}
400-
argv_array_push(&rev_argv, arg);
400+
strvec_push(&rev_argv, arg);
401401
}
402402
}
403403
}
@@ -412,22 +412,22 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern
412412
}
413413

414414
if (commit_graph && !ctx.qry.follow) {
415-
argv_array_push(&rev_argv, "--graph");
416-
argv_array_push(&rev_argv, "--color");
415+
strvec_push(&rev_argv, "--graph");
416+
strvec_push(&rev_argv, "--color");
417417
graph_set_column_colors(column_colors_html,
418418
COLUMN_COLORS_HTML_MAX);
419419
}
420420

421421
if (commit_sort == 1)
422-
argv_array_push(&rev_argv, "--date-order");
422+
strvec_push(&rev_argv, "--date-order");
423423
else if (commit_sort == 2)
424-
argv_array_push(&rev_argv, "--topo-order");
424+
strvec_push(&rev_argv, "--topo-order");
425425

426426
if (path && ctx.qry.follow)
427-
argv_array_push(&rev_argv, "--follow");
428-
argv_array_push(&rev_argv, "--");
427+
strvec_push(&rev_argv, "--follow");
428+
strvec_push(&rev_argv, "--");
429429
if (path)
430-
argv_array_push(&rev_argv, path);
430+
strvec_push(&rev_argv, path);
431431

432432
init_revisions(&rev, NULL);
433433
rev.abbrev = DEFAULT_ABBREV;
@@ -436,7 +436,7 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern
436436
rev.show_root_diff = 0;
437437
rev.ignore_missing = 1;
438438
rev.simplify_history = 1;
439-
setup_revisions(rev_argv.argc, rev_argv.argv, &rev, NULL);
439+
setup_revisions(rev_argv.nr, rev_argv.v, &rev, NULL);
440440
load_ref_decorations(NULL, DECORATE_FULL_REFS);
441441
rev.show_decorations = 1;
442442
rev.grep_filter.ignore_case = 1;

ui-snapshot.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,32 +13,32 @@
1313

1414
static int write_archive_type(const char *format, const char *hex, const char *prefix)
1515
{
16-
struct argv_array argv = ARGV_ARRAY_INIT;
16+
struct strvec argv = STRVEC_INIT;
1717
const char **nargv;
1818
int result;
19-
argv_array_push(&argv, "snapshot");
20-
argv_array_push(&argv, format);
19+
strvec_push(&argv, "snapshot");
20+
strvec_push(&argv, format);
2121
if (prefix) {
2222
struct strbuf buf = STRBUF_INIT;
2323
strbuf_addstr(&buf, prefix);
2424
strbuf_addch(&buf, '/');
25-
argv_array_push(&argv, "--prefix");
26-
argv_array_push(&argv, buf.buf);
25+
strvec_push(&argv, "--prefix");
26+
strvec_push(&argv, buf.buf);
2727
strbuf_release(&buf);
2828
}
29-
argv_array_push(&argv, hex);
29+
strvec_push(&argv, hex);
3030
/*
3131
* Now we need to copy the pointers to arguments into a new
3232
* structure because write_archive will rearrange its arguments
3333
* which may result in duplicated/missing entries causing leaks
34-
* or double-frees in argv_array_clear.
34+
* or double-frees in strvec_clear.
3535
*/
36-
nargv = xmalloc(sizeof(char *) * (argv.argc + 1));
37-
/* argv_array guarantees a trailing NULL entry. */
38-
memcpy(nargv, argv.argv, sizeof(char *) * (argv.argc + 1));
36+
nargv = xmalloc(sizeof(char *) * (argv.nr + 1));
37+
/* strvec guarantees a trailing NULL entry. */
38+
memcpy(nargv, argv.v, sizeof(char *) * (argv.nr + 1));
3939

40-
result = write_archive(argv.argc, nargv, NULL, the_repository, NULL, 0);
41-
argv_array_clear(&argv);
40+
result = write_archive(argv.nr, nargv, NULL, the_repository, NULL, 0);
41+
strvec_clear(&argv);
4242
free(nargv);
4343
return result;
4444
}

0 commit comments

Comments
 (0)