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

[PATCH 00/10] Remove the_index, the final part

From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Date
Jan 5, 2019, 05:51 UTC
Message-ID
<20190105055153.3256-1-pclouds@gmail.com>

This completely removes the_index outside builtin/. The macro NO_THE_INDEX_COMPATIBILITY_MACROS is replaced with USE_THE_INDEX_COMPATIBILITY_MACROS, which means by default you don't have access to the_index any more. And USE_THE_... should only be defined in builtin/

There's one easy conflict in builtin/rebase.c when merging this to 'pu'. builtin/stash.c also needs to define USE_THE_... to build, but I think that could be part of the builtin stash topic when it's rerolled.

Nguyễn Thái Ngọc Duy (10):
  notes-utils.c: remove the_repository references
  repository.c: replace hold_locked_index() with repo_hold_locked_index()
  checkout: avoid the_index when possible
  read-cache.c: kill read_index()
  read-cache.c: replace update_index_if_able with repo_&
  sha1-name.c: remove implicit dependency on the_index
  merge-recursive.c: remove implicit dependency on the_index
  merge-recursive.c: remove implicit dependency on the_repository
  read-cache.c: remove the_* from index_has_changes()
  cache.h: flip NO_THE_INDEX_COMPATIBILITY_MACROS switch
 apply.c                              |   5 +-
 attr.c                               |   1 -
 blame.c                              |   4 +-
 builtin/add.c                        |   1 +
 builtin/am.c                         |  13 +-
 builtin/blame.c                      |   3 +-
 builtin/cat-file.c                   |   7 +-
 builtin/check-attr.c                 |   1 +
 builtin/check-ignore.c               |   1 +
 builtin/checkout-index.c             |   1 +
 builtin/checkout.c                   |   5 +-
 builtin/clean.c                      |   1 +
 builtin/clone.c                      |   1 +
 builtin/commit.c                     |   7 +-
 builtin/describe.c                   |   3 +-
 builtin/diff-files.c                 |   1 +
 builtin/diff-index.c                 |   1 +
 builtin/diff-tree.c                  |   3 +-
 builtin/diff.c                       |   3 +-
 builtin/difftool.c                   |   1 +
 builtin/fsck.c                       |   1 +
 builtin/grep.c                       |   4 +-
 builtin/hash-object.c                |   3 +-
 builtin/log.c                        |   4 +-
 builtin/ls-files.c                   |   1 -
 builtin/merge-index.c                |   1 +
 builtin/merge-ours.c                 |   1 +
 builtin/merge-recursive.c            |   2 +-
 builtin/merge-tree.c                 |   4 +-
 builtin/merge.c                      |   3 +-
 builtin/mv.c                         |   1 +
 builtin/notes.c                      |  21 +--
 builtin/pack-objects.c               |   2 +-
 builtin/pull.c                       |   1 +
 builtin/read-tree.c                  |   1 +
 builtin/rebase--interactive.c        |   1 +
 builtin/rebase.c                     |  14 +-
 builtin/replace.c                    |   2 +-
 builtin/reset.c                      |   1 +
 builtin/rev-parse.c                  |   4 +-
 builtin/rm.c                         |   1 +
 builtin/submodule--helper.c          |   1 +
 builtin/update-index.c               |   1 +
 builtin/write-tree.c                 |   1 +
 cache-tree.h                         |   2 +-
 cache.h                              |  35 ++---
 convert.c                            |   1 -
 dir.c                                |   1 -
 git.c                                |   4 +-
 list-objects-filter-options.c        |   2 +-
 merge-recursive.c                    | 191 +++++++++++++++------------
 merge-recursive.h                    |   6 +-
 merge.c                              |   4 +-
 name-hash.c                          |   1 -
 notes-merge.c                        |   4 +-
 notes-utils.c                        |  17 ++-
 notes-utils.h                        |  11 +-
 pathspec.c                           |   1 -
 preload-index.c                      |  11 +-
 read-cache.c                         |  44 +++---
 repository.c                         |   9 ++
 repository.h                         |  16 +++
 rerere.c                             |   8 +-
 revision.c                           |  12 +-
 sequencer.c                          |  41 +++---
 sequencer.h                          |   3 +-
 sha1-name.c                          |  56 ++++----
 submodule.c                          |   1 -
 t/helper/test-dump-fsmonitor.c       |   4 +-
 t/helper/test-dump-untracked-cache.c |   1 +
 t/helper/test-tool.h                 |   1 +
 tree.c                               |   1 -
 unpack-trees.c                       |   1 -
 wt-status.c                          |   4 +-
 74 files changed, 359 insertions(+), 273 deletions(-)
-- 
2.20.0.482.g66447595a7
Next: Nguyễn Thái Ngọc Duy
Message 1 of 25 in “Remove the_index, the final part”
  1. 00/10 Remove the_index, the final partNguyễn Thái Ngọc Duy, Jan 5, 2019
  2. 01/10 notes-utils.c: remove the_repository referencesNguyễn Thái Ngọc Duy, Jan 5, 2019
  3. 02/10 repository.c: replace hold_locked_index() with repo_hold_locked_index()Nguyễn Thái Ngọc Duy, Jan 5, 2019
  4. Martin ÅgrenJan 5, 2019
  5. Duy NguyenJan 7, 2019
  6. 03/10 checkout: avoid the_index when possibleNguyễn Thái Ngọc Duy, Jan 5, 2019
  7. 04/10 read-cache.c: kill read_index()Nguyễn Thái Ngọc Duy, Jan 5, 2019
  8. 05/10 read-cache.c: replace update_index_if_able with repo_&Nguyễn Thái Ngọc Duy, Jan 5, 2019
  9. 06/10 sha1-name.c: remove implicit dependency on the_indexNguyễn Thái Ngọc Duy, Jan 5, 2019
  10. 07/10 merge-recursive.c: remove implicit dependency on the_indexNguyễn Thái Ngọc Duy, Jan 5, 2019
  11. 08/10 merge-recursive.c: remove implicit dependency on the_repositoryNguyễn Thái Ngọc Duy, Jan 5, 2019
  12. 09/10 read-cache.c: remove the_* from index_has_changes()Nguyễn Thái Ngọc Duy, Jan 5, 2019
  13. 10/10 cache.h: flip NO_THE_INDEX_COMPATIBILITY_MACROS switchNguyễn Thái Ngọc Duy, Jan 5, 2019
  14. 00/11 Remove the_index, the final partNguyễn Thái Ngọc Duy, Jan 12, 2019
  15. 01/11 grep: use grep_opt->repo instead of explict repo argumentNguyễn Thái Ngọc Duy, Jan 12, 2019
  16. 02/11 notes-utils.c: remove the_repository referencesNguyễn Thái Ngọc Duy, Jan 12, 2019
  17. 03/11 repository.c: replace hold_locked_index() with repo_hold_locked_index()Nguyễn Thái Ngọc Duy, Jan 12, 2019
  18. 04/11 checkout: avoid the_index when possibleNguyễn Thái Ngọc Duy, Jan 12, 2019
  19. 05/11 read-cache.c: kill read_index()Nguyễn Thái Ngọc Duy, Jan 12, 2019
  20. 06/11 read-cache.c: replace update_index_if_able with repo_&Nguyễn Thái Ngọc Duy, Jan 12, 2019
  21. 07/11 sha1-name.c: remove implicit dependency on the_indexNguyễn Thái Ngọc Duy, Jan 12, 2019
  22. 08/11 merge-recursive.c: remove implicit dependency on the_indexNguyễn Thái Ngọc Duy, Jan 12, 2019
  23. 09/11 merge-recursive.c: remove implicit dependency on the_repositoryNguyễn Thái Ngọc Duy, Jan 12, 2019
  24. 10/11 read-cache.c: remove the_* from index_has_changes()Nguyễn Thái Ngọc Duy, Jan 12, 2019
  25. 11/11 cache.h: flip NO_THE_INDEX_COMPATIBILITY_MACROS switchNguyễn Thái Ngọc Duy, Jan 12, 2019

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.