diff options
| author | Jacob Keller <jacob.keller@gmail.com> | 2025-06-23 16:11:32 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-06-23 16:38:56 -0700 |
| commit | f8542961da88bee31f7e0da21fd8d2792d62f888 (patch) | |
| tree | a28e290f56ae788a29ac22887c260d83c9505e7f /builtin/commit-tree.c | |
| parent | dir: move starts_with_dot(_dot)_slash to dir.h (diff) | |
| download | git-f8542961da88bee31f7e0da21fd8d2792d62f888.tar.gz git-f8542961da88bee31f7e0da21fd8d2792d62f888.zip | |
remote: remove the_repository from some functions
The remotes_remote_get_1 (and its caller, remotes_remote_get, have an
implicit dependency on the_repository due to calling
read_branches_file() and read_remotes_file(), both of which use
the_repository. The branch_get() function calls set_merge() which has an
implicit dependency on the_repository as well.
Because of this use of the_repository, the helper functions cannot be
used in code paths which operate on other repositories. A future
refactor of the submodule--helper will want to make use of some of these
functions.
Refactor to break the dependency by passing struct repository *repo
instead of struct remote_state *remote_state in a few places.
The public callers and many other helper functions still depend on
the_repository. A repo-aware function will be exposed in a following
change for git submodule--helper.
Signed-off-by: Jacob Keller <jacob.keller@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit-tree.c')
0 files changed, 0 insertions, 0 deletions
