All of lore.kernel.org
 help / color / mirror / Atom feed
From: "John Cai via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: John Cai <johncai86@gmail.com>
Subject: [PATCH 0/3] Add repository parameter to builtins
Date: Thu, 05 Sep 2024 16:57:44 +0000	[thread overview]
Message-ID: <pull.1778.git.git.1725555467.gitgitgadget@gmail.com> (raw)

As part of the effort to remove global state of the_repository, add a
repository parameter to builtins so that a repository variable can be passed
down. The patches are ordered as follows:

 1. Changes the signature of builtins and passes the_repository down in
    git.c to be called by all builtins.
 2. Remove USE_THE_REPOSITORY_VARIABLE from builtin.h, and instead add it to
    each individual builtin. This paves the way for a migration process
    whereby each builtin can be migrated away from using the_repository.
 3. As an example, migrate builtin/add.c to get rid of the_repository by
    instead passing the repository argument down into helper functions.

John Cai (3):
  builtin: add a repository parameter for builtin functions
  builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h
  add: pass in repo variable instead of global the_repository

 builtin.h                          | 285 ++++++++++++++---------------
 builtin/add.c                      |  99 +++++-----
 builtin/am.c                       |   3 +-
 builtin/annotate.c                 |   4 +-
 builtin/apply.c                    |   3 +-
 builtin/archive.c                  |   3 +-
 builtin/bisect.c                   |   3 +-
 builtin/blame.c                    |   4 +-
 builtin/branch.c                   |   5 +-
 builtin/bugreport.c                |   3 +-
 builtin/bundle.c                   |   3 +-
 builtin/cat-file.c                 |   7 +-
 builtin/check-attr.c               |   3 +-
 builtin/check-ignore.c             |   3 +-
 builtin/check-mailmap.c            |   3 +-
 builtin/check-ref-format.c         |   2 +-
 builtin/checkout--worker.c         |   3 +-
 builtin/checkout-index.c           |   3 +-
 builtin/checkout.c                 |   7 +-
 builtin/clean.c                    |   4 +-
 builtin/clone.c                    |   5 +-
 builtin/column.c                   |   4 +-
 builtin/commit-graph.c             |   3 +-
 builtin/commit-tree.c              |   3 +-
 builtin/commit.c                   |   9 +-
 builtin/config.c                   |   3 +-
 builtin/count-objects.c            |   4 +-
 builtin/credential-cache--daemon.c |   5 +-
 builtin/credential-cache.c         |   2 +-
 builtin/credential-store.c         |   3 +-
 builtin/credential.c               |   4 +-
 builtin/describe.c                 |   5 +-
 builtin/diagnose.c                 |   2 +-
 builtin/diff-files.c               |   3 +-
 builtin/diff-index.c               |   3 +-
 builtin/diff-tree.c                |   3 +-
 builtin/diff.c                     |   5 +-
 builtin/difftool.c                 |   5 +-
 builtin/fast-export.c              |   4 +-
 builtin/fast-import.c              |   3 +-
 builtin/fetch-pack.c               |   3 +-
 builtin/fetch.c                    |   3 +-
 builtin/fmt-merge-msg.c            |   3 +-
 builtin/for-each-ref.c             |   3 +-
 builtin/for-each-repo.c            |   3 +-
 builtin/fsck.c                     |   3 +-
 builtin/fsmonitor--daemon.c        |   5 +-
 builtin/gc.c                       |   6 +-
 builtin/get-tar-commit-id.c        |   2 +-
 builtin/grep.c                     |   3 +-
 builtin/hash-object.c              |   4 +-
 builtin/help.c                     |   4 +-
 builtin/hook.c                     |   3 +-
 builtin/index-pack.c               |   3 +-
 builtin/init-db.c                  |   2 +-
 builtin/interpret-trailers.c       |   4 +-
 builtin/log.c                      |  13 +-
 builtin/ls-files.c                 |   3 +-
 builtin/ls-remote.c                |   3 +-
 builtin/ls-tree.c                  |   4 +-
 builtin/mailinfo.c                 |   2 +-
 builtin/mailsplit.c                |   2 +-
 builtin/merge-base.c               |   3 +-
 builtin/merge-file.c               |   3 +-
 builtin/merge-index.c              |   3 +-
 builtin/merge-ours.c               |   3 +-
 builtin/merge-recursive.c          |   3 +-
 builtin/merge-tree.c               |   3 +-
 builtin/merge.c                    |   9 +-
 builtin/mktag.c                    |   3 +-
 builtin/mktree.c                   |   4 +-
 builtin/multi-pack-index.c         |   3 +-
 builtin/mv.c                       |   3 +-
 builtin/name-rev.c                 |   3 +-
 builtin/notes.c                    |   4 +-
 builtin/pack-objects.c             |   3 +-
 builtin/pack-redundant.c           |   3 +-
 builtin/pack-refs.c                |   3 +-
 builtin/patch-id.c                 |   3 +-
 builtin/prune-packed.c             |   2 +-
 builtin/prune.c                    |   3 +-
 builtin/pull.c                     |   3 +-
 builtin/push.c                     |   3 +-
 builtin/range-diff.c               |   3 +-
 builtin/read-tree.c                |   4 +-
 builtin/rebase.c                   |   5 +-
 builtin/receive-pack.c             |   3 +-
 builtin/reflog.c                   |   7 +-
 builtin/refs.c                     |   3 +-
 builtin/remote-ext.c               |   2 +-
 builtin/remote-fd.c                |   2 +-
 builtin/remote.c                   |   3 +-
 builtin/repack.c                   |   3 +-
 builtin/replace.c                  |   3 +-
 builtin/replay.c                   |   3 +-
 builtin/rerere.c                   |   3 +-
 builtin/reset.c                    |   5 +-
 builtin/rev-list.c                 |   3 +-
 builtin/rev-parse.c                |   5 +-
 builtin/revert.c                   |   5 +-
 builtin/rm.c                       |   4 +-
 builtin/send-pack.c                |   3 +-
 builtin/shortlog.c                 |   3 +-
 builtin/show-branch.c              |   3 +-
 builtin/show-index.c               |   3 +-
 builtin/show-ref.c                 |   3 +-
 builtin/sparse-checkout.c          |   3 +-
 builtin/stash.c                    |   3 +-
 builtin/stripspace.c               |   3 +-
 builtin/submodule--helper.c        |   3 +-
 builtin/symbolic-ref.c             |   3 +-
 builtin/tag.c                      |   5 +-
 builtin/unpack-file.c              |   3 +-
 builtin/unpack-objects.c           |   3 +-
 builtin/update-index.c             |   3 +-
 builtin/update-ref.c               |   3 +-
 builtin/update-server-info.c       |   3 +-
 builtin/upload-archive.c           |   5 +-
 builtin/upload-pack.c              |   2 +-
 builtin/var.c                      |   4 +-
 builtin/verify-commit.c            |   3 +-
 builtin/verify-pack.c              |   3 +-
 builtin/verify-tag.c               |   4 +-
 builtin/worktree.c                 |   3 +-
 builtin/write-tree.c               |   4 +-
 commit.h                           |   3 +-
 git.c                              |  14 +-
 help.c                             |   3 +-
 128 files changed, 477 insertions(+), 366 deletions(-)


base-commit: 4590f2e9412378c61eac95966709c78766d326ba
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1778%2Fjohn-cai%2Fjc%2Fadd-the-repository-to-builtin-signature-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1778/john-cai/jc/add-the-repository-to-builtin-signature-v1
Pull-Request: https://github.com/git/git/pull/1778
-- 
gitgitgadget

             reply	other threads:[~2024-09-05 16:57 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-05 16:57 John Cai via GitGitGadget [this message]
2024-09-05 16:57 ` [PATCH 1/3] builtin: add a repository parameter for builtin functions John Cai via GitGitGadget
2024-09-06 10:46   ` Patrick Steinhardt
2024-09-09 21:08     ` John Cai
2024-09-05 16:57 ` [PATCH 2/3] builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h John Cai via GitGitGadget
2024-09-05 17:50   ` Junio C Hamano
2024-09-06 10:46     ` Patrick Steinhardt
2024-09-06 15:43   ` Junio C Hamano
2024-09-05 16:57 ` [PATCH 3/3] add: pass in repo variable instead of global the_repository John Cai via GitGitGadget
2024-09-06 10:46   ` Patrick Steinhardt
2024-09-05 17:21 ` [PATCH 0/3] Add repository parameter to builtins Junio C Hamano
2024-09-10 20:59 ` [PATCH v2 " John Cai via GitGitGadget
2024-09-10 20:59   ` [PATCH v2 1/3] builtin: add a repository parameter for builtin functions John Cai via GitGitGadget
2024-09-10 21:40     ` Junio C Hamano
2024-09-11 21:08       ` Junio C Hamano
2024-09-12  9:45         ` Patrick Steinhardt
2024-09-12 10:43           ` Jeff King
2024-09-12 10:50             ` Jeff King
2024-09-12 10:55               ` Patrick Steinhardt
2024-09-13 17:54                 ` John Cai
2024-09-10 20:59   ` [PATCH v2 2/3] builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h John Cai via GitGitGadget
2024-09-11 18:15     ` Junio C Hamano
2024-09-13 18:00       ` John Cai
2024-09-10 20:59   ` [PATCH v2 3/3] add: pass in repo variable instead of global the_repository John Cai via GitGitGadget
2024-09-11 18:23     ` Junio C Hamano
2024-09-13 21:16   ` [PATCH v3 0/4] Add repository parameter to builtins John Cai via GitGitGadget
2024-09-13 21:16     ` [PATCH v3 1/4] builtin: add a repository parameter for builtin functions John Cai via GitGitGadget
2024-09-13 21:16     ` [PATCH v3 2/4] builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h John Cai via GitGitGadget
2024-09-13 21:32       ` Junio C Hamano
2024-09-13 21:16     ` [PATCH v3 3/4] builtin: remove USE_THE_REPOSITORY for those without the_repository John Cai via GitGitGadget
2024-09-13 21:16     ` [PATCH v3 4/4] add: pass in repo variable instead of global the_repository John Cai via GitGitGadget
2024-09-13 21:35       ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=pull.1778.git.git.1725555467.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=johncai86@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.