diff options
author | Glen Choo <chooglen@google.com> | 2021-11-18 01:53:23 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-11-19 07:31:19 +0100 |
commit | 085b98f6cdbe9ed794e19ded00ccd0431c30faa0 (patch) | |
tree | 3002c91fceb943ef7cb658c8dd6632fedf5db8f0 /remote.h | |
parent | remote: move static variables into per-repository struct (diff) | |
download | git-085b98f6cdbe9ed794e19ded00ccd0431c30faa0.tar.xz git-085b98f6cdbe9ed794e19ded00ccd0431c30faa0.zip |
remote: use remote_state parameter internally
Without changing external-facing functions, replace
the_repository->remote_state internally by adding a struct remote_state
parameter.
As a result, external-facing functions are still tied to the_repository,
but most static functions no longer reference
the_repository->remote_state. The exceptions are those that are used in
a way that depends on external-facing functions e.g. the callbacks to
remote_get_1().
Signed-off-by: Glen Choo <chooglen@google.com>
Reviewed-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'remote.h')
-rw-r--r-- | remote.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -52,6 +52,8 @@ struct remote_state { struct rewrites rewrites; struct rewrites rewrites_push; + + int initialized; }; void remote_state_clear(struct remote_state *remote_state); |