Re: [PATCH 2/3] builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 5, 2024, 17:50 UTC
- Message-ID
- <xmqqcyli2dnx.fsf@gitster.g>
- In-Reply-To
- <17acc1e054c26b67659df17db828b106c005ffea.1725555468.git.gitgitgadget@gmail.com>
"John Cai via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 9 quoted lines
> From: John Cai <johncai86@gmail.com> > > Instead of including USE_THE_REPOSITORY_VARIABLE by default on every > builtin, remove it from builtin.h and add it where necessary to > individual builtins/*. The next step will be to migrate each builtin > from having to use the_repository. > > Signed-off-by: John Cai <johncai86@gmail.com> > ---
We at least need the following fix-up in order to play nice with others, specifically Patrick's ps/environ-wo-the-repository, when the topic is merged to 'seen'.
Thanks.
diff --git i/builtin/init-db.c w/builtin/init-db.c index b0ac318cc6..cb5fc340a2 100644 --- i/builtin/init-db.c +++ w/builtin/init-db.c @@ -3,6 +3,8 @@ * * Copyright (C) Linus Torvalds, 2005 */ +#define USE_THE_REPOSITORY_VARIABLE + #include "builtin.h" #include "abspath.h" #include "environment.h" diff --git i/builtin/mailinfo.c w/builtin/mailinfo.c index d883ccf459..aed1199710 100644 --- i/builtin/mailinfo.c +++ w/builtin/mailinfo.c @@ -2,6 +2,8 @@ * Another stupid program, this one parsing the headers of an * email to figure out authorship and subject */ +#define USE_THE_REPOSITORY_VARIABLE + #include "builtin.h" #include "abspath.h" #include "environment.h"