threads / patch / 66529

patchdiffcore-break: remove USE_THE_REPOSITORY_VARIABLE

Subject: [Outreachy PATCH] diffcore-break: remove USE_THE_REPOSITORY_VARIABLE

## tl;dr

7 messages between Oct 14, 2026 and Oct 26, 2026. Diffs are folded; open one to read it.

replies: 6people: 3as markdown or json

Okhuomon Ajayi· Oct 14, 2026, 08:12 UTC · lore

Since 84325f0730 (merge,diff: remove the_repository check before prefetching blobs, 2026-02-21), diffcore-break.c no longer references the_repository, so it does not need USE_THE_REPOSITORY_VARIABLE.

Without this, new use of the_repository in this file would fail to compile.

Signed-off-by: Okhuomon Ajayi <okhuomonajayi54@gmail.com>
---
 diffcore-break.c | 2 --
 1 file changed, 2 deletions(-)
Show changes to diffcore-break.c +0 −2
diff --git a/diffcore-break.c b/diffcore-break.c
index b5bcc956cc..71d0e48beb 100644
--- a/diffcore-break.c
+++ b/diffcore-break.c
@@ -2,8 +2,6 @@
  * Copyright (C) 2005 Junio C Hamano
  */
 
-#define USE_THE_REPOSITORY_VARIABLE
-
 #include "git-compat-util.h"
 #include "diffcore.h"
 #include "hash.h"
-- 
2.54.0
Usman Akinyemi· Oct 14, 2026, 10:24 UTC · re: Okhuomon Ajayi · lore

Re: [Outreachy PATCH] diffcore-break: remove USE_THE_REPOSITORY_VARIABLE

>
> Since 84325f0730 (merge,diff: remove the_repository check before
> prefetching blobs, 2026-02-21), diffcore-break.c no longer references
> the_repository, so it does not need USE_THE_REPOSITORY_VARIABLE.
Good finding.
>
> Without this, new use of the_repository in this file would fail to
> compile.
I do not understand this statement.
Show 5 quoted lines
>
> Signed-off-by: Okhuomon Ajayi <okhuomonajayi54@gmail.com>
> ---
>  diffcore-break.c | 2 --
>  1 file changed, 2 deletions(-)
Okhuomon Ajayi· Oct 14, 2026, 10:57 UTC · re: Usman Akinyemi · lore

Re: [Outreachy PATCH] diffcore-break: remove USE_THE_REPOSITORY_VARIABLE

On Wed, Oct 14, 2026 at 11:25 AM Usman Akinyemi <usmanakinyemi202@gmail.com> wrote:

> > Without this, new use of the_repository in this file would fail to
> > compile.
> I do not understand this statement.

Thanks for the review. I meant that since the USE_THE_REPOSITORY_VARIABLE has been removed, any future use of the_repository without adding the USE_THE_REPOSITORY_VARIABLE macro would fail to compile. I see that my statement above is not clear, I would modify the wordings and send in a v2.

Usman Akinyemi· Oct 14, 2026, 11:10 UTC · re: Okhuomon Ajayi · lore

Re: [Outreachy PATCH] diffcore-break: remove USE_THE_REPOSITORY_VARIABLE

Show 7 quoted lines
>
> Thanks for the review.
> I meant that since the USE_THE_REPOSITORY_VARIABLE has been removed, any
> future use of  the_repository without adding the
> USE_THE_REPOSITORY_VARIABLE macro would fail to compile.
> I see that my statement above is not clear, I would modify the
> wordings and send in a v2.

You do not need to add that. That is literally like explaining if and else statements in the commit message. It is not needed.

Thanks.
Okhuomon Ajayi· Oct 14, 2026, 11:12 UTC · re: Usman Akinyemi · lore

Re: [Outreachy PATCH] diffcore-break: remove USE_THE_REPOSITORY_VARIABLE

On Wed, Oct 14, 2026 at 12:11 PM Usman Akinyemi <usmanakinyemi202@gmail.com> wrote:

Show 11 quoted lines
> > Thanks for the review.
> > I meant that since the USE_THE_REPOSITORY_VARIABLE has been removed, any
> > future use of  the_repository without adding the
> > USE_THE_REPOSITORY_VARIABLE macro would fail to compile.
> > I see that my statement above is not clear, I would modify the
> > wordings and send in a v2.
> You do not need to add that. That is literally like explaining if and
> else statements
> in the commit message. It is not needed.
>
> Thanks.

Yeah, i would take it out of the commit message in my v2 Thanks

Okhuomon Ajayi· Oct 14, 2026, 11:49 UTC · re: Okhuomon Ajayi · lore

[Outreachy PATCH v2] diffcore-break: remove USE_THE_REPOSITORY_VARIABLE

Since 84325f0730 (merge,diff: remove the_repository check before prefetching blobs, 2026-02-21), diffcore-break.c no longer references the_repository, so it does not need USE_THE_REPOSITORY_VARIABLE.

Signed-off-by: Okhuomon Ajayi <okhuomonajayi54@gmail.com>
---
Changes since v1:
- Removed the last paragraph of the commit message, as suggested by
  Usman. No code was changed.
 diffcore-break.c | 2 --
 1 file changed, 2 deletions(-)
Show changes to diffcore-break.c +0 −2
diff --git a/diffcore-break.c b/diffcore-break.c
index b5bcc956cc..71d0e48beb 100644
--- a/diffcore-break.c
+++ b/diffcore-break.c
@@ -2,8 +2,6 @@
  * Copyright (C) 2005 Junio C Hamano
  */
 
-#define USE_THE_REPOSITORY_VARIABLE
-
 #include "git-compat-util.h"
 #include "diffcore.h"
 #include "hash.h"
-- 
2.54.0
Junio C Hamano· Oct 26, 2026, 18:10 UTC · re: Okhuomon Ajayi · lore

Re: [Outreachy PATCH v2] diffcore-break: remove USE_THE_REPOSITORY_VARIABLE

Okhuomon Ajayi <okhuomonajayi54@gmail.com> writes:
Show 9 quoted lines
> Since 84325f0730 (merge,diff: remove the_repository check before
> prefetching blobs, 2026-02-21), diffcore-break.c no longer references
> the_repository, so it does not need USE_THE_REPOSITORY_VARIABLE.
>
> Signed-off-by: Okhuomon Ajayi <okhuomonajayi54@gmail.com>
> ---
> Changes since v1:
> - Removed the last paragraph of the commit message, as suggested by
>   Usman. No code was changed.
Thanks for writing and reviewing.  Will queue.
Show 17 quoted lines
>
>  diffcore-break.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/diffcore-break.c b/diffcore-break.c
> index b5bcc956cc..71d0e48beb 100644
> --- a/diffcore-break.c
> +++ b/diffcore-break.c
> @@ -2,8 +2,6 @@
>   * Copyright (C) 2005 Junio C Hamano
>   */
>  
> -#define USE_THE_REPOSITORY_VARIABLE
> -
>  #include "git-compat-util.h"
>  #include "diffcore.h"
>  #include "hash.h"

← back to recent threads