Re: [PATCH 1/1] git: update to v2.29.0
"Jason A. Donenfeld" on Tue, 2020/10/20 00:40: > Thanks for this. It'll be curious to give this a spin with a sha256 repo... BTW, cgit does not (yet) handle sha256 repositories correctly. -- main(a){char*c=/*Schoene Gruesse */"B?IJj;MEH" "CX:;",b;for(a/*Best regards my address:*/=0;b=c[a++];) putchar(b-1/(/*Chriscc -ox -xc - && ./x*/b/42*2-3)*42);} pgpR5fJp9wFc7.pgp Description: OpenPGP digital signature
Re: [PATCH 1/1] git: update to v2.29.0
"Jason A. Donenfeld" on Tue, 2020/10/20 00:40: > Thanks for this. It'll be curious to give this a spin with a sha256 repo... Queuing in ch/for-jason... As working with branches can be quite annoying with breaking changes in a submodule... Can we commit this any time soon? And the mailing list backlog needs some attention as well... :) -- main(a){char*c=/*Schoene Gruesse */"B?IJj;MEH" "CX:;",b;for(a/*Best regards my address:*/=0;b=c[a++];) putchar(b-1/(/*Chriscc -ox -xc - && ./x*/b/42*2-3)*42);} pgp1TGpg4TBs7.pgp Description: OpenPGP digital signature
Re: [PATCH 1/1] git: update to v2.29.0
Thanks for this. It'll be curious to give this a spin with a sha256 repo... On Mon, Oct 19, 2020 at 8:36 PM Christian Hesse wrote: > > From: Christian Hesse > > 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 > --- > Makefile | 2 +- > cgit.h | 2 +- > git | 2 +- > tests/t0109-gitconfig.sh | 2 +- > ui-blame.c | 10 +- > ui-log.c | 30 +++--- > ui-snapshot.c| 24 > 7 files changed, 36 insertions(+), 36 deletions(-) > > diff --git a/Makefile b/Makefile > index 84822f0..c947b63 100644 > --- a/Makefile > +++ b/Makefile > @@ -14,7 +14,7 @@ htmldir = $(docdir) > pdfdir = $(docdir) > mandir = $(prefix)/share/man > SHA1_HEADER = > -GIT_VER = 2.28.0 > +GIT_VER = 2.29.0 > GIT_URL = https://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.xz > INSTALL = install > COPYTREE = cp -r > diff --git a/cgit.h b/cgit.h > index 7ec46b4..f5db364 100644 > --- a/cgit.h > +++ b/cgit.h > @@ -14,7 +14,7 @@ > #include > #include > #include > -#include > +#include > #include > #include > #include > diff --git a/git b/git > index 47ae905..69986e1 16 > --- a/git > +++ b/git > @@ -1 +1 @@ > -Subproject commit 47ae905ffb98cc4d4fd90083da6bc8dab55d9ecc > +Subproject commit 69986e19ffcfb9af674ae5180689ab7bbf92ed28 > diff --git a/tests/t0109-gitconfig.sh b/tests/t0109-gitconfig.sh > index 8cee75c..189ef28 100755 > --- a/tests/t0109-gitconfig.sh > +++ b/tests/t0109-gitconfig.sh > @@ -25,7 +25,7 @@ test_no_home_access () { > -E CGIT_CONFIG="$PWD/cgitrc" \ > -E QUERY_STRING="url=$1" \ > -e access -f -o strace.out cgit && > - test_must_fail grep "$non_existent_path" strace.out > + ! grep "$non_existent_path" strace.out > } > > test_no_home_access_success() { > diff --git a/ui-blame.c b/ui-blame.c > index f28eea0..c3662bb 100644 > --- a/ui-blame.c > +++ b/ui-blame.c > @@ -10,7 +10,7 @@ > #include "ui-blame.h" > #include "html.h" > #include "ui-shared.h" > -#include "argv-array.h" > +#include "strvec.h" > #include "blame.h" > > > @@ -104,7 +104,7 @@ static void print_object(const struct object_id *oid, > const char *path, > enum object_type type; > char *buf; > unsigned long size; > - struct argv_array rev_argv = ARGV_ARRAY_INIT; > + struct strvec rev_argv = STRVEC_INIT; > struct rev_info revs; > struct blame_scoreboard sb; > struct blame_origin *o; > @@ -124,11 +124,11 @@ static void print_object(const struct object_id *oid, > const char *path, > return; > } > > - argv_array_push(_argv, "blame"); > - argv_array_push(_argv, rev); > + strvec_push(_argv, "blame"); > + strvec_push(_argv, rev); > init_revisions(, NULL); > revs.diffopt.flags.allow_textconv = 1; > - setup_revisions(rev_argv.argc, rev_argv.argv, , NULL); > + setup_revisions(rev_argv.nr, rev_argv.v, , NULL); > init_scoreboard(); > sb.revs = > sb.repo = the_repository; > diff --git a/ui-log.c b/ui-log.c > index 2939c01..fd07409 100644 > --- a/ui-log.c > +++ b/ui-log.c > @@ -10,7 +10,7 @@ > #include "ui-log.h" > #include "html.h" > #include "ui-shared.h" > -#include "argv-array.h" > +#include "strvec.h" > > static int files, add_lines, rem_lines, lines_counted; > > @@ -366,23 +366,23 @@ void cgit_print_log(const char *tip, int ofs, int cnt, > char *grep, char *pattern > { > struct rev_info rev; > struct commit *commit; > - struct argv_array rev_argv = ARGV_ARRAY_INIT; > + struct strvec rev_argv = STRVEC_INIT; > int i, columns = commit_graph ? 4 : 3; > int must_free_tip = 0; > > /* rev_argv.argv[0] will be ignored by setup_revisions */ > - argv_array_push(_argv, "log_rev_setup"); > + strvec_push(_argv, "log_rev_setup"); > > if (!tip) > tip = ctx.qry.head; > tip = disambiguate_ref(tip, _free_tip); > - argv_array_push(_argv, tip); > + strvec_push(_argv, tip); > > if (grep && pattern && *pattern) { > pattern = xstrdup(pattern); > if (!strcmp(grep, "grep") || !strcmp(grep, "author") || > !strcmp(grep, "committer")) { > - argv_array_pushf(_argv, "--%s=%s", grep, pattern); > + strvec_pushf(_argv, "--%s=%s", grep, pattern); > }
[PATCH 1/1] git: update to v2.29.0
From: Christian Hesse 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 --- Makefile | 2 +- cgit.h | 2 +- git | 2 +- tests/t0109-gitconfig.sh | 2 +- ui-blame.c | 10 +- ui-log.c | 30 +++--- ui-snapshot.c| 24 7 files changed, 36 insertions(+), 36 deletions(-) diff --git a/Makefile b/Makefile index 84822f0..c947b63 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ htmldir = $(docdir) pdfdir = $(docdir) mandir = $(prefix)/share/man SHA1_HEADER = -GIT_VER = 2.28.0 +GIT_VER = 2.29.0 GIT_URL = https://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.xz INSTALL = install COPYTREE = cp -r diff --git a/cgit.h b/cgit.h index 7ec46b4..f5db364 100644 --- a/cgit.h +++ b/cgit.h @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/git b/git index 47ae905..69986e1 16 --- a/git +++ b/git @@ -1 +1 @@ -Subproject commit 47ae905ffb98cc4d4fd90083da6bc8dab55d9ecc +Subproject commit 69986e19ffcfb9af674ae5180689ab7bbf92ed28 diff --git a/tests/t0109-gitconfig.sh b/tests/t0109-gitconfig.sh index 8cee75c..189ef28 100755 --- a/tests/t0109-gitconfig.sh +++ b/tests/t0109-gitconfig.sh @@ -25,7 +25,7 @@ test_no_home_access () { -E CGIT_CONFIG="$PWD/cgitrc" \ -E QUERY_STRING="url=$1" \ -e access -f -o strace.out cgit && - test_must_fail grep "$non_existent_path" strace.out + ! grep "$non_existent_path" strace.out } test_no_home_access_success() { diff --git a/ui-blame.c b/ui-blame.c index f28eea0..c3662bb 100644 --- a/ui-blame.c +++ b/ui-blame.c @@ -10,7 +10,7 @@ #include "ui-blame.h" #include "html.h" #include "ui-shared.h" -#include "argv-array.h" +#include "strvec.h" #include "blame.h" @@ -104,7 +104,7 @@ static void print_object(const struct object_id *oid, const char *path, enum object_type type; char *buf; unsigned long size; - struct argv_array rev_argv = ARGV_ARRAY_INIT; + struct strvec rev_argv = STRVEC_INIT; struct rev_info revs; struct blame_scoreboard sb; struct blame_origin *o; @@ -124,11 +124,11 @@ static void print_object(const struct object_id *oid, const char *path, return; } - argv_array_push(_argv, "blame"); - argv_array_push(_argv, rev); + strvec_push(_argv, "blame"); + strvec_push(_argv, rev); init_revisions(, NULL); revs.diffopt.flags.allow_textconv = 1; - setup_revisions(rev_argv.argc, rev_argv.argv, , NULL); + setup_revisions(rev_argv.nr, rev_argv.v, , NULL); init_scoreboard(); sb.revs = sb.repo = the_repository; diff --git a/ui-log.c b/ui-log.c index 2939c01..fd07409 100644 --- a/ui-log.c +++ b/ui-log.c @@ -10,7 +10,7 @@ #include "ui-log.h" #include "html.h" #include "ui-shared.h" -#include "argv-array.h" +#include "strvec.h" static int files, add_lines, rem_lines, lines_counted; @@ -366,23 +366,23 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern { struct rev_info rev; struct commit *commit; - struct argv_array rev_argv = ARGV_ARRAY_INIT; + struct strvec rev_argv = STRVEC_INIT; int i, columns = commit_graph ? 4 : 3; int must_free_tip = 0; /* rev_argv.argv[0] will be ignored by setup_revisions */ - argv_array_push(_argv, "log_rev_setup"); + strvec_push(_argv, "log_rev_setup"); if (!tip) tip = ctx.qry.head; tip = disambiguate_ref(tip, _free_tip); - argv_array_push(_argv, tip); + strvec_push(_argv, tip); if (grep && pattern && *pattern) { pattern = xstrdup(pattern); if (!strcmp(grep, "grep") || !strcmp(grep, "author") || !strcmp(grep, "committer")) { - argv_array_pushf(_argv, "--%s=%s", grep, pattern); + strvec_pushf(_argv, "--%s=%s", grep, pattern); } else if (!strcmp(grep, "range")) { char *arg; /* Split the pattern at whitespace and add each token @@ -390,14 +390,14 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern * rev-list options. Also, replace the previously * pushed tip (it's no longer relevant). */