git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] version: stop using the_repository

From
René Scharfe <l.s.r@web.de>
Date
Feb 8, 2026, 17:01 UTC
Message-ID
<afccdc3a-8672-49a7-b260-e77e617d8976@web.de>

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(-)
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
Next: Patrick Steinhardt
Message 1 of 2 in “version: stop using the_repository”
  1. version: stop using the_repositoryRené Scharfe, Feb 8, 2026
  2. Patrick SteinhardtFeb 9, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.