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

[PATCH 0/5] Start of a journey: drop NO_THE_INDEX_COMPATIBILITY_MACROS

From
Stefan Beller <sbeller@google.com>
Date
May 1, 2017, 19:07 UTC
Message-ID
<20170501190719.10669-1-sbeller@google.com>
This applies to origin/master.

For better readability and understandability for newcomers it is a good idea to not offer 2 APIs doing the same thing with on being the #define of the other.

In the long run we may want to drop the macros guarded by NO_THE_INDEX_COMPATIBILITY_MACROS. This converts a couple of them.

My main reason for this patch is to try out coccinelle as well as a discussion I had off list about maintainability of software.

I just made these patches and wonder if now is a good time to pull through and convert the rest as well?

Thanks, Stefan

Stefan Beller (5):
  cache.h: drop read_cache()
  cache.h: drop active_* macros
  cache.h: drop read_cache_from
  cache.h: drop read_cache_preload(pathspec)
  cache.h: drop read_cache_unmerged()
 apply.c                              | 10 +++----
 builtin/add.c                        | 10 +++----
 builtin/am.c                         | 14 +++++-----
 builtin/blame.c                      | 10 +++----
 builtin/check-attr.c                 |  2 +-
 builtin/check-ignore.c               |  4 +--
 builtin/checkout-index.c             | 10 +++----
 builtin/checkout.c                   | 53 ++++++++++++++++++------------------
 builtin/clean.c                      |  2 +-
 builtin/commit.c                     | 32 +++++++++++-----------
 builtin/describe.c                   |  2 +-
 builtin/diff-files.c                 |  4 +--
 builtin/diff-index.c                 |  6 ++--
 builtin/diff.c                       | 14 +++++-----
 builtin/fsck.c                       | 14 +++++-----
 builtin/grep.c                       | 10 +++----
 builtin/ls-files.c                   | 38 +++++++++++++-------------
 builtin/merge-index.c                | 12 ++++----
 builtin/merge.c                      | 14 +++++-----
 builtin/mv.c                         | 12 ++++----
 builtin/pull.c                       |  2 +-
 builtin/read-tree.c                  |  4 +--
 builtin/reset.c                      |  4 +--
 builtin/rev-parse.c                  |  2 +-
 builtin/rm.c                         | 18 ++++++------
 builtin/submodule--helper.c          | 10 +++----
 builtin/update-index.c               | 52 ++++++++++++++++++-----------------
 cache.h                              | 10 -------
 check-racy.c                         |  6 ++--
 diff-lib.c                           |  6 ++--
 diff.c                               | 10 +++----
 dir.c                                | 20 +++++++-------
 merge-recursive.c                    | 30 ++++++++++----------
 merge.c                              |  2 +-
 pathspec.c                           | 14 +++++-----
 read-cache.c                         |  4 +--
 rerere.c                             | 32 +++++++++++-----------
 revision.c                           | 22 +++++++--------
 sequencer.c                          | 27 +++++++++---------
 sha1_name.c                          | 16 +++++------
 submodule.c                          | 16 +++++------
 t/helper/test-dump-cache-tree.c      |  4 +--
 t/helper/test-dump-untracked-cache.c |  2 +-
 t/helper/test-lazy-init-name-hash.c  | 10 +++----
 t/helper/test-read-cache.c           |  2 +-
 t/helper/test-scrap-cache-tree.c     |  4 +--
 t/t2107-update-index-basic.sh        |  2 +-
 tree.c                               |  8 +++---
 wt-status.c                          | 12 ++++----
 49 files changed, 309 insertions(+), 315 deletions(-)
-- 
2.13.0.rc1.1.gbc33f0f778
Next: Stefan Beller
Message 1 of 25 in “Start of a journey: drop NO_THE_INDEX_COMPATIBILITY_MACROS”
  1. 0/5 Start of a journey: drop NO_THE_INDEX_COMPATIBILITY_MACROSStefan Beller, May 1, 2017
  2. 1/5 cache.h: drop read_cache()Stefan Beller, May 1, 2017
  3. 2/5 cache.h: drop active_* macrosStefan Beller, May 1, 2017
  4. 3/5 cache.h: drop read_cache_fromStefan Beller, May 1, 2017
  5. 4/5 cache.h: drop read_cache_preload(pathspec)Stefan Beller, May 1, 2017
  6. 5/5 cache.h: drop read_cache_unmerged()Stefan Beller, May 1, 2017
  7. Junio C HamanoMay 2, 2017
  8. Stefan BellerMay 2, 2017
  9. Jeff HostetlerMay 2, 2017
  10. Samuel LijinMay 3, 2017
  11. Stefan BellerMay 3, 2017
  12. Samuel LijinMay 3, 2017
  13. Brandon WilliamsMay 4, 2017
  14. Duy NguyenMay 3, 2017
  15. Stefan BellerMay 3, 2017
  16. Junio C HamanoMay 4, 2017
  17. Brandon WilliamsMay 4, 2017
  18. Stefan BellerMay 4, 2017
  19. Johannes SchindelinMay 5, 2017
  20. Brandon WilliamsMay 5, 2017
  21. Jonathan NiederMay 4, 2017
  22. Junio C HamanoMay 5, 2017
  23. Brandon WilliamsMay 5, 2017
  24. Jeff HostetlerMay 2, 2017
  25. Stefan BellerMay 2, 2017

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.