git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] global: drop external `the_index` variable
@ 2024-04-15 11:42 Patrick Steinhardt
  2024-04-15 11:42 ` [PATCH 1/5] t/helper: stop using `the_index` Patrick Steinhardt
                   ` (7 more replies)
  0 siblings, 8 replies; 26+ messages in thread
From: Patrick Steinhardt @ 2024-04-15 11:42 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 3306 bytes --]

Hi,

this patch series converts remaining users of `the_index` to stop using
it, instead using `the_repository->index`. This gets rid of one more
global variable and brings a project over the finish line that has
started back in 2007.

I realize that this patch series is quite large, and that reviewers will
eventually start to just gloss over things because the conversions are
kind of boring, too. Also, due to the size it's quite likely to conflict
with in-flight topics. So if you think that this is too large, please
let me know and I will happily split this up into multiple series.

The motivation of these patches comes from the introduction of the ref
format extension. I found it really hard to reason about the state of
`the_repository` and would like to continue its deprecation in favor of
explicitly passing down a `struct repository *`. Getting rid of
`the_index` is a first easy step into that direction to make things more
self-contained.

Patrick

Patrick Steinhardt (5):
  t/helper: stop using `the_index`
  builtin: stop using `the_index`
  repository: initialize index in `repo_init()`
  builtin/clone: stop using `the_index`
  repository: drop global `the_index` variable

 builtin/add.c                        |  48 +++++------
 builtin/am.c                         |  36 ++++----
 builtin/cat-file.c                   |   3 +-
 builtin/check-attr.c                 |   5 +-
 builtin/check-ignore.c               |   7 +-
 builtin/checkout-index.c             |  22 ++---
 builtin/checkout.c                   |  87 ++++++++++---------
 builtin/clean.c                      |   7 +-
 builtin/clone.c                      |   7 +-
 builtin/commit.c                     |  81 +++++++++---------
 builtin/describe.c                   |   3 +-
 builtin/diff-tree.c                  |   3 +-
 builtin/diff.c                       |   6 +-
 builtin/difftool.c                   |   4 +-
 builtin/merge-index.c                |  17 ++--
 builtin/merge-tree.c                 |   3 +-
 builtin/merge.c                      |  31 ++++---
 builtin/mv.c                         |  68 +++++++--------
 builtin/pull.c                       |   4 +-
 builtin/read-tree.c                  |  15 ++--
 builtin/rebase.c                     |   3 +-
 builtin/replay.c                     |   1 -
 builtin/reset.c                      |  32 +++----
 builtin/rev-parse.c                  |   6 +-
 builtin/rm.c                         |  40 ++++-----
 builtin/stash.c                      |  45 +++++-----
 builtin/submodule--helper.c          |  21 +++--
 builtin/update-index.c               | 122 +++++++++++++--------------
 builtin/write-tree.c                 |   6 +-
 repository.c                         |  32 ++++---
 repository.h                         |   3 -
 t/helper/test-cache-tree.c           |  17 ++--
 t/helper/test-dump-cache-tree.c      |   5 +-
 t/helper/test-dump-split-index.c     |  11 ++-
 t/helper/test-dump-untracked-cache.c |   3 +-
 t/helper/test-lazy-init-name-hash.c  |  39 +++++----
 t/helper/test-read-cache.c           |   9 +-
 t/helper/test-scrap-cache-tree.c     |   7 +-
 t/helper/test-write-cache.c          |   3 +-
 39 files changed, 420 insertions(+), 442 deletions(-)

-- 
2.44.GIT


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2024-04-19  4:25 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-15 11:42 [PATCH 0/5] global: drop external `the_index` variable Patrick Steinhardt
2024-04-15 11:42 ` [PATCH 1/5] t/helper: stop using `the_index` Patrick Steinhardt
2024-04-17 17:23   ` Karthik Nayak
2024-04-15 11:42 ` [PATCH 2/5] builtin: " Patrick Steinhardt
2024-04-17 17:32   ` Karthik Nayak
2024-04-18 12:16     ` Patrick Steinhardt
2024-04-15 11:42 ` [PATCH 3/5] repository: initialize index in `repo_init()` Patrick Steinhardt
2024-04-17 17:38   ` Karthik Nayak
2024-04-18 12:16     ` Patrick Steinhardt
2024-04-15 11:43 ` [PATCH 4/5] builtin/clone: stop using `the_index` Patrick Steinhardt
2024-04-15 11:43 ` [PATCH 5/5] repository: drop global `the_index` variable Patrick Steinhardt
2024-04-15 13:55 ` [PATCH 0/5] global: drop external " Phillip Wood
2024-04-15 14:15   ` Patrick Steinhardt
2024-04-15 17:50   ` Junio C Hamano
2024-04-16  5:27     ` Patrick Steinhardt
2024-04-17 17:40 ` Karthik Nayak
2024-04-18 12:16   ` Patrick Steinhardt
2024-04-18 12:14 ` [PATCH v2 0/6] global: drop " Patrick Steinhardt
2024-04-18 12:14   ` [PATCH v2 1/6] t/helper: stop using `the_index` Patrick Steinhardt
2024-04-18 12:14   ` [PATCH v2 2/6] builtin: " Patrick Steinhardt
2024-04-18 12:14   ` [PATCH v2 3/6] repository: initialize index in `repo_init()` Patrick Steinhardt
2024-04-18 12:14   ` [PATCH v2 4/6] builtin/clone: stop using `the_index` Patrick Steinhardt
2024-04-18 12:14   ` [PATCH v2 5/6] repository: drop `the_index` variable Patrick Steinhardt
2024-04-18 12:14   ` [PATCH v2 6/6] repository: drop `initialize_the_repository()` Patrick Steinhardt
2024-04-18 19:36   ` [PATCH v2 0/6] global: drop `the_index` variable Junio C Hamano
2024-04-19  4:25     ` Patrick Steinhardt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).