On Mon, 10 Jun 2024, Junio C Hamano <gitster@xxxxxxxxx> wrote: > Ghanshyam Thakkar <shyamthakkar001@xxxxxxxxx> writes: > > > On Mon, 10 Jun 2024, Junio C Hamano <gitster@xxxxxxxxx> wrote: > >> Ghanshyam Thakkar <shyamthakkar001@xxxxxxxxx> writes: > >> > >> > helper/test-oidtree.c along with t0069-oidtree.sh test the oidtree.h > >> > library, which is a wrapper around crit-bit tree. Migrate them to > >> > the unit testing framework for better debugging and runtime > >> > performance. Along with the migration, add an extra check for > >> > oidtree_each() test, which showcases how multiple expected matches can > >> > be given to check_each() helper. > >> > ... > >> > >> Use "LAST_ARG_MUST_BE_NULL" here, probably. > >> > +static void check_each(struct oidtree *ot, char *query, ...) > > > > I see that you already made this change in merge-fix/gt/unit-test-oidtree. > > Thanks for that. > > That is merely tentative. LAST_ARG_MUST_BE_NULL must be on the base > topic, as it is not something that suddenly becomes required after > getting merged to the integration branch (unlike other changes in > the merge-fix which became necessary in the world order after Patrick's > const string fixes are merged). > > I do not know what other fixes are needed, and if there is nothing > else that needs to be done in gt/unit-test-oidtree topic, I can do > "git commit --amend" before merging it to 'next' (unless I forget, > that is ;-)), but if you are rerolling, please do not forget to add > that (you do not need to do the constness changes, which will require > you to rebase on top of whatever contains Patrick's work). Yeah, I'll reroll as rebasing on 'ps/no-writable-strings' did produce some errors but the change required was minimal, so I'll include it anyway: diff --git a/t/unit-tests/t-oidtree.c b/t/unit-tests/t-oidtree.c index cecefde899..a38754b066 100644 --- a/t/unit-tests/t-oidtree.c +++ b/t/unit-tests/t-oidtree.c @@ -62,7 +62,7 @@ static enum cb_next check_each_cb(const struct object_id *oid, void *data) } LAST_ARG_MUST_BE_NULL -static void check_each(struct oidtree *ot, char *query, ...) +static void check_each(struct oidtree *ot, const char *query, ...) { struct object_id oid; struct expected_hex_iter hex_iter = { .expected_hexes = STRVEC_INIT, Thanks.