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

[PATCH v3 3/4] builtin: remove USE_THE_REPOSITORY for those without the_repository

From
John Cai via GitGitGadget <gitgitgadget@gmail.com>
Date
Sep 13, 2024, 21:16 UTC
Message-ID
<004283a1e5baf2ca60609600b7b5f75bdfc776ee.1726262178.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.1778.v3.git.git.1726262177.gitgitgadget@gmail.com>
From: John Cai <johncai86@gmail.com>

For builtins that do not operate on a repository, remove the #define USE_THE_REPOSITORY.

Signed-off-by: John Cai <johncai86@gmail.com>
---
 builtin/check-ref-format.c  | 1 -
 builtin/credential-cache.c  | 1 -
 builtin/diagnose.c          | 1 -
 builtin/get-tar-commit-id.c | 1 -
 builtin/mailsplit.c         | 1 -
 builtin/prune-packed.c      | 1 -
 builtin/remote-ext.c        | 1 -
 builtin/remote-fd.c         | 1 -
 builtin/upload-pack.c       | 1 -
 9 files changed, 9 deletions(-)
diff --git a/builtin/check-ref-format.c b/builtin/check-ref-format.c
index 65945171b3f..e86d8ef980b 100644
--- a/builtin/check-ref-format.c
+++ b/builtin/check-ref-format.c
@@ -1,7 +1,6 @@
 /*
  * GIT - The information manager from hell
  */
-#define USE_THE_REPOSITORY_VARIABLE
 #include "builtin.h"
 #include "refs.h"
 #include "setup.h"
diff --git a/builtin/credential-cache.c b/builtin/credential-cache.c
index 1918c474f02..5de8b9123bf 100644
--- a/builtin/credential-cache.c
+++ b/builtin/credential-cache.c
@@ -1,4 +1,3 @@
-#define USE_THE_REPOSITORY_VARIABLE
 #include "builtin.h"
 #include "credential.h"
 #include "gettext.h"
diff --git a/builtin/diagnose.c b/builtin/diagnose.c
index 5ac7872b998..66a22d918e6 100644
--- a/builtin/diagnose.c
+++ b/builtin/diagnose.c
@@ -1,4 +1,3 @@
-#define USE_THE_REPOSITORY_VARIABLE
 #include "builtin.h"
 #include "abspath.h"
 #include "gettext.h"
diff --git a/builtin/get-tar-commit-id.c b/builtin/get-tar-commit-id.c
index 272384a6b15..6bec0d1854c 100644
--- a/builtin/get-tar-commit-id.c
+++ b/builtin/get-tar-commit-id.c
@@ -1,7 +1,6 @@
 /*
  * Copyright (c) 2005, 2006 Rene Scharfe
  */
-#define USE_THE_REPOSITORY_VARIABLE
 #include "builtin.h"
 #include "commit.h"
 #include "tar.h"
diff --git a/builtin/mailsplit.c b/builtin/mailsplit.c
index 24254221417..b8f7150ce9a 100644
--- a/builtin/mailsplit.c
+++ b/builtin/mailsplit.c
@@ -4,7 +4,6 @@
  * It just splits a mbox into a list of files: "0001" "0002" ..
  * so you can process them further from there.
  */
-#define USE_THE_REPOSITORY_VARIABLE
 #include "builtin.h"
 #include "gettext.h"
 #include "string-list.h"
diff --git a/builtin/prune-packed.c b/builtin/prune-packed.c
index 0720d825c83..4d63f26b0a1 100644
--- a/builtin/prune-packed.c
+++ b/builtin/prune-packed.c
@@ -1,4 +1,3 @@
-#define USE_THE_REPOSITORY_VARIABLE
 #include "builtin.h"
 #include "gettext.h"
 #include "parse-options.h"
diff --git a/builtin/remote-ext.c b/builtin/remote-ext.c
index 119f33895e7..33c8ae0fc7d 100644
--- a/builtin/remote-ext.c
+++ b/builtin/remote-ext.c
@@ -1,4 +1,3 @@
-#define USE_THE_REPOSITORY_VARIABLE
 #include "builtin.h"
 #include "transport.h"
 #include "run-command.h"
diff --git a/builtin/remote-fd.c b/builtin/remote-fd.c
index b27ea81e4fb..ae896eda57b 100644
--- a/builtin/remote-fd.c
+++ b/builtin/remote-fd.c
@@ -1,4 +1,3 @@
-#define USE_THE_REPOSITORY_VARIABLE
 #include "builtin.h"
 #include "transport.h"
 
diff --git a/builtin/upload-pack.c b/builtin/upload-pack.c
index 363091c31e8..3b6c83fbce3 100644
--- a/builtin/upload-pack.c
+++ b/builtin/upload-pack.c
@@ -1,4 +1,3 @@
-#define USE_THE_REPOSITORY_VARIABLE
 #include "builtin.h"
 #include "exec-cmd.h"
 #include "gettext.h"
-- 
gitgitgadget
Previous: John Cai via GitGitGadgetNext: John Cai via GitGitGadget
Message 28 of 32 in “Add repository parameter to builtins”
  1. 0/3 Add repository parameter to builtinsJohn Cai via GitGitGadget, Sep 5, 2024
  2. 2/3 builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.hJohn Cai via GitGitGadget, Sep 5, 2024
  3. Junio C HamanoSep 5, 2024
  4. Patrick SteinhardtSep 6, 2024
  5. Junio C HamanoSep 6, 2024
  6. 1/3 builtin: add a repository parameter for builtin functionsJohn Cai via GitGitGadget, Sep 5, 2024
  7. Patrick SteinhardtSep 6, 2024
  8. John CaiSep 9, 2024
  9. 3/3 add: pass in repo variable instead of global the_repositoryJohn Cai via GitGitGadget, Sep 5, 2024
  10. Patrick SteinhardtSep 6, 2024
  11. Junio C HamanoSep 5, 2024
  12. 0/3 Add repository parameter to builtinsJohn Cai via GitGitGadget, Sep 10, 2024
  13. 3/3 add: pass in repo variable instead of global the_repositoryJohn Cai via GitGitGadget, Sep 10, 2024
  14. Junio C HamanoSep 11, 2024
  15. 2/3 builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.hJohn Cai via GitGitGadget, Sep 10, 2024
  16. Junio C HamanoSep 11, 2024
  17. John CaiSep 13, 2024
  18. 1/3 builtin: add a repository parameter for builtin functionsJohn Cai via GitGitGadget, Sep 10, 2024
  19. Junio C HamanoSep 10, 2024
  20. Junio C HamanoSep 11, 2024
  21. Patrick SteinhardtSep 12, 2024
  22. Jeff KingSep 12, 2024
  23. Jeff KingSep 12, 2024
  24. Patrick SteinhardtSep 12, 2024
  25. John CaiSep 13, 2024
  26. 0/4 Add repository parameter to builtinsJohn Cai via GitGitGadget, Sep 13, 2024
  27. 1/4 builtin: add a repository parameter for builtin functionsJohn Cai via GitGitGadget, Sep 13, 2024
  28. 3/4 builtin: remove USE_THE_REPOSITORY for those without the_repositoryJohn Cai via GitGitGadget, Sep 13, 2024
  29. 2/4 builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.hJohn Cai via GitGitGadget, Sep 13, 2024
  30. Junio C HamanoSep 13, 2024
  31. 4/4 add: pass in repo variable instead of global the_repositoryJohn Cai via GitGitGadget, Sep 13, 2024
  32. Junio C HamanoSep 13, 2024

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.