Skip to content

Kill the_index, final part

Nguyễn Thái Ngọc Duy git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest19 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/19wt-status.c: remove implicit dependency on the_indexbuiltin/commit.c builtin/pull.c sequencer.c +2 more+62 -430 replies
2/19wt-status.c: remove implicit dependency the_repositoryref-filter.c wt-status.c wt-status.h+14 -100 replies
3/19list-objects-filter.c: remove implicit dependency on the_indexlist-objects-filter.c list-objects-filter.h list-objects.c+9 -20 replies
4/19list-objects.c: remove implicit dependency on the_indexlist-objects.c+3 -30 replies
5/19sequencer.c: remove implicit dependency on the_indexbuiltin/commit.c builtin/merge.c builtin/rebase--helper.c +3 more+197 -1510 replies
6/19sequencer.c: remove implicit dependency on the_repositorybuiltin/rebase--helper.c builtin/revert.c sequencer.c +1 more+70 -620 replies
7/19notes-merge.c: remove implicit dependency on the_indexbuiltin/notes.c notes-merge.c notes-merge.h+13 -70 replies
8/19notes-merge.c: remove implicit dependency the_repositorynotes-merge.c+2 -20 replies
9/19repository.c: replace hold_locked_index() with repo_hold_locked_index()apply.c builtin/clone.c cache.h +8 more+24 -150 replies
10/19checkout: avoid the_index when possiblebuiltin/checkout.c+1 -10 replies
11/19read-cache.c: kill read_index()apply.c blame.c builtin/am.c +12 more+46 -470 replies
12/19read-cache.c: replace update_index_if_able with repo_&builtin/commit.c builtin/describe.c builtin/diff.c +4 more+18 -160 replies
13/19transport.c: remove implicit dependency on the_indexbuiltin/push.c transport.c transport.h+8 -50 replies
14/19sha1-name.c: remove implicit dependency on the_indexbuiltin/cat-file.c builtin/grep.c builtin/log.c +5 more+50 -330 replies
15/19merge-recursive.c: remove implicit dependency on the_indexbuiltin/am.c builtin/checkout.c builtin/merge-recursive.c +4 more+94 -750 replies
16/19merge-recursive.c: remove implicit dependency on the_repositorymerge-recursive.c+24 -210 replies
17/19read-cache.c: remove the_* from index_has_changes()builtin/am.c cache.h merge-recursive.c +1 more+12 -140 replies
18/19cache.h: flip NO_THE_INDEX_COMPATIBILITY_MACROS switchattr.c builtin/add.c builtin/am.c +49 more+49 -240 replies
19/19Flip NO_THE_REPOSITORY_COMPATIBILITY_MACROSdiff.h rerere.h revision.h+3 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH/WIP 00/19] Kill the_index, final part

Stefan I see you start removing more references of the_repository in another series (haven't really looked at it yet) so this is just heads up so we could coordinate if needed. Still WIP, not really ready for review yet.

This series removes use of the_index outside builtin/ and t/helper/. The only the_index reference left is in repository.c. The macro NO_THE_REPOSITORY_COMPATIBILITY_MACROS is now flipped to USE_THE_INDEX_COMPATIBILITY_MACROS. "the_index" is forbidden by default.

After this I think we can start pushing the_repository outside library code. Then perhaps clean them up in builtin code too and you can finally get rid of it. But I don't think that'll happen in a year's time.

Nguyễn Thái Ngọc Duy (19):
wt-status.c: remove implicit dependency on the_index wt-status.c: remove implicit dependency the_repository list-objects-filter.c: remove implicit dependency on the_index list-objects.c: remove implicit dependency on the_index sequencer.c: remove implicit dependency on the_index sequencer.c: remove implicit dependency on the_repository notes-merge.c: remove implicit dependency on the_index notes-merge.c: remove implicit dependency the_repository 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_& transport.c: remove implicit dependency on the_index 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
Flip NO_THE_REPOSITORY_COMPATIBILITY_MACROS

 apply.c                              |   5 +-
 attr.c                               |   1 -
 blame.c                              |   4 +-
 builtin/add.c                        |   1 +
 builtin/am.c                         |  11 +-
 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                     |  10 +-
 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                 |   3 +-
 builtin/merge.c                      |   5 +-
 builtin/mv.c                         |   1 +
 builtin/notes.c                      |   2 +-
 builtin/pack-objects.c               |   2 +-
 builtin/pull.c                       |   4 +-
 builtin/push.c                       |   3 +-
 builtin/read-tree.c                  |   1 +
 builtin/rebase--helper.c             |  15 +-
 builtin/replace.c                    |   2 +-
 builtin/reset.c                      |   1 +
 builtin/rev-parse.c                  |   4 +-
 builtin/revert.c                     |   6 +-
 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 -
 diff.h                               |   2 +-
 dir.c                                |   1 -
 git.c                                |   4 +-
 list-objects-filter-options.c        |   2 +-
 list-objects-filter.c                |   7 +-
 list-objects-filter.h                |   1 +
 list-objects.c                       |   3 +
 merge-recursive.c                    | 194 ++++++------
 merge-recursive.h                    |   6 +-
 merge.c                              |   4 +-
 name-hash.c                          |   1 -
 notes-merge.c                        |  16 +-
 notes-merge.h                        |   6 +-
 pathspec.c                           |   1 -
 preload-index.c                      |  11 +-
 read-cache.c                         |  44 ++-
 ref-filter.c                         |   2 +-
 repository.c                         |   9 +
 repository.h                         |  16 +
 rerere.c                             |   8 +-
 rerere.h                             |   2 +-
 revision.c                           |  12 +-
 revision.h                           |   2 +-
 sequencer.c                          | 435 +++++++++++++++------------
 sequencer.h                          |  27 +-
 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 +
 transport.c                          |   7 +-
 transport.h                          |   3 +-
 tree.c                               |   1 -
 unpack-trees.c                       |   1 -
 wt-status.c                          |  97 +++---
 wt-status.h                          |  21 +-
 84 files changed, 673 insertions(+), 508 deletions(-)
Signature · 1 line
2.19.1.647.g708186aaf9