Subject: Re: [PATCH 2/3] builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h

From: Junio C Hamano <[email-masked]>
Date: Thu, 05 Sep 2024 10:50:10 -0700

"John Cai via GitGitGadget" <[email-masked]> writes:

> From: John Cai <[email-masked]>
>
> 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 <[email-masked]>
> ---

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"