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

[PATCH 19/19] Flip NO_THE_REPOSITORY_COMPATIBILITY_MACROS

From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Date
Oct 19, 2018, 14:52 UTC
Message-ID
<20181019145237.16079-20-pclouds@gmail.com>
In-Reply-To
<20181019145237.16079-1-pclouds@gmail.com>

Similar to NO_THE_INDEX_COMPATIBILITY_MACROS, this switch is now off by default. It remains here just to make it easier to merge in-flight topics where the old functions are still used. Then you can just stick

    #define USE_THE_REPOSITORY_COMPATIBILITY_MACROS
at the beginning of those files.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
 diff.h     | 2 +-
 rerere.h   | 2 +-
 revision.h | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/diff.h b/diff.h
index ce5e8a8183..de7cb7018f 100644
--- a/diff.h
+++ b/diff.h
@@ -341,7 +341,7 @@ int git_diff_basic_config(const char *var, const char *value, void *cb);
 int git_diff_heuristic_config(const char *var, const char *value, void *cb);
 void init_diff_ui_defaults(void);
 int git_diff_ui_config(const char *var, const char *value, void *cb);
-#ifndef NO_THE_REPOSITORY_COMPATIBILITY_MACROS
+#ifdef USE_THE_REPOSITORY_COMPATIBILITY_MACROS
 #define diff_setup(diffopts) repo_diff_setup(the_repository, diffopts)
 #endif
 void repo_diff_setup(struct repository *, struct diff_options *);
diff --git a/rerere.h b/rerere.h
index 5ad8864b3c..8ddd0b20da 100644
--- a/rerere.h
+++ b/rerere.h
@@ -24,7 +24,7 @@ struct rerere_id {
 };
 
 int setup_rerere(struct string_list *, int);
-#ifndef NO_THE_REPOSITORY_COMPATIBILITY_MACROS
+#ifdef USE_THE_REPOSITORY_COMPATIBILITY_MACROS
 #define rerere(flags) repo_rerere(the_repository, flags)
 #endif
 int repo_rerere(struct repository *, int);
diff --git a/revision.h b/revision.h
index bc30a3023e..5b6ab10143 100644
--- a/revision.h
+++ b/revision.h
@@ -271,7 +271,7 @@ struct setup_revision_opt {
 	unsigned revarg_opt;
 };
 
-#ifndef NO_THE_REPOSITORY_COMPATIBILITY_MACROS
+#ifdef USE_THE_REPOSITORY_COMPATIBILITY_MACROS
 #define init_revisions(revs, prefix) repo_init_revisions(the_repository, revs, prefix)
 #endif
 void repo_init_revisions(struct repository *r,
-- 
2.19.1.647.g708186aaf9
Previous: Nguyễn Thái Ngọc DuyNext: Nguyễn Thái Ngọc Duy
Message 19 of 22 in “Kill the_index, final part”
  1. 00/19 Kill the_index, final partNguyễn Thái Ngọc Duy, Oct 19, 2018
  2. 01/19 wt-status.c: remove implicit dependency on the_indexNguyễn Thái Ngọc Duy, Oct 19, 2018
  3. 02/19 wt-status.c: remove implicit dependency the_repositoryNguyễn Thái Ngọc Duy, Oct 19, 2018
  4. 03/19 list-objects-filter.c: remove implicit dependency on the_indexNguyễn Thái Ngọc Duy, Oct 19, 2018
  5. 04/19 list-objects.c: remove implicit dependency on the_indexNguyễn Thái Ngọc Duy, Oct 19, 2018
  6. 06/19 sequencer.c: remove implicit dependency on the_repositoryNguyễn Thái Ngọc Duy, Oct 19, 2018
  7. 05/19 sequencer.c: remove implicit dependency on the_indexNguyễn Thái Ngọc Duy, Oct 19, 2018
  8. 08/19 notes-merge.c: remove implicit dependency the_repositoryNguyễn Thái Ngọc Duy, Oct 19, 2018
  9. 07/19 notes-merge.c: remove implicit dependency on the_indexNguyễn Thái Ngọc Duy, Oct 19, 2018
  10. 09/19 repository.c: replace hold_locked_index() with repo_hold_locked_index()Nguyễn Thái Ngọc Duy, Oct 19, 2018
  11. 10/19 checkout: avoid the_index when possibleNguyễn Thái Ngọc Duy, Oct 19, 2018
  12. 12/19 read-cache.c: replace update_index_if_able with repo_&Nguyễn Thái Ngọc Duy, Oct 19, 2018
  13. 13/19 transport.c: remove implicit dependency on the_indexNguyễn Thái Ngọc Duy, Oct 19, 2018
  14. 11/19 read-cache.c: kill read_index()Nguyễn Thái Ngọc Duy, Oct 19, 2018
  15. 14/19 sha1-name.c: remove implicit dependency on the_indexNguyễn Thái Ngọc Duy, Oct 19, 2018
  16. 16/19 merge-recursive.c: remove implicit dependency on the_repositoryNguyễn Thái Ngọc Duy, Oct 19, 2018
  17. 15/19 merge-recursive.c: remove implicit dependency on the_indexNguyễn Thái Ngọc Duy, Oct 19, 2018
  18. 17/19 read-cache.c: remove the_* from index_has_changes()Nguyễn Thái Ngọc Duy, Oct 19, 2018
  19. 19/19 Flip NO_THE_REPOSITORY_COMPATIBILITY_MACROSNguyễn Thái Ngọc Duy, Oct 19, 2018
  20. 18/19 cache.h: flip NO_THE_INDEX_COMPATIBILITY_MACROS switchNguyễn Thái Ngọc Duy, Oct 19, 2018
  21. Stefan BellerOct 19, 2018
  22. Duy NguyenOct 29, 2018

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.