threads / patch / 64950

patchversion: stop using the_repository

Subject: [PATCH] version: stop using the_repository

## tl;dr

2 messages between Feb 8, 2026 and Feb 9, 2026. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

René Scharfe· Feb 8, 2026, 17:01 UTC · lore

Actually it has never been used in version.c since cf7ee481902 (agent: advertise OS name via agent capability, 2025-02-15) added the dependency macro. Remove it, along with the also unused struct declaration.

Signed-off-by: René Scharfe <l.s.r@web.de>
---
 version.c | 2 --
 version.h | 2 --
 2 files changed, 4 deletions(-)
Show changes to 2 files +0 −4

version.c, version.h

diff --git a/version.c b/version.c
index 279269cc50..21ec7c0fbe 100644
--- a/version.c
+++ b/version.c
@@ -1,5 +1,3 @@
-#define USE_THE_REPOSITORY_VARIABLE
-
 #include "git-compat-util.h"
 #include "version.h"
 #include "strbuf.h"
diff --git a/version.h b/version.h
index bbde6d371a..7d502dcee0 100644
--- a/version.h
+++ b/version.h
@@ -1,8 +1,6 @@
 #ifndef VERSION_H
 #define VERSION_H
 
-struct repository;
-
 extern const char git_version_string[];
 extern const char git_built_from_commit_string[];
 
-- 
2.52.0
Patrick Steinhardt· Feb 9, 2026, 09:24 UTC · re: René Scharfe · lore

Re: [PATCH] version: stop using the_repository

On Sun, Feb 08, 2026 at 06:01:24PM +0100, René Scharfe wrote:
> Actually it has never been used in version.c since cf7ee481902 (agent:
> advertise OS name via agent capability, 2025-02-15) added the dependency
> macro.  Remove it, along with the also unused struct declaration.
Quite straight forward, looks good to me. Thanks!
Patrick

← back to recent threads