diff options
| author | John Cai <johncai86@gmail.com> | 2024-08-09 15:37:49 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-08-09 08:47:33 -0700 |
| commit | cfd971520ed11096aaa11f6bd1ee99b307f3146c (patch) | |
| tree | 616578d53f64884cdac7bd6906572d109d7a36f1 /refs/refs-internal.h | |
| parent | 39bf06adf96da25b87c9aa7d35a32ef3683eb4a4 (diff) | |
| download | git-cfd971520ed11096aaa11f6bd1ee99b307f3146c.tar.gz | |
refs: keep track of unresolved reference value in iterators
Since ref iterators do not hold onto the direct value of a reference
without resolving it, the only way to get ahold of a direct value of a
symbolic ref is to make a separate call to refs_read_symbolic_ref.
To make accessing the direct value of a symbolic ref more efficient,
let's save the direct value of the ref in the iterators for both the
files backend and the reftable backend.
Signed-off-by: John Cai <johncai86@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs/refs-internal.h')
| -rw-r--r-- | refs/refs-internal.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/refs/refs-internal.h b/refs/refs-internal.h index fa975d69aa..117ec23384 100644 --- a/refs/refs-internal.h +++ b/refs/refs-internal.h @@ -299,6 +299,7 @@ enum do_for_each_ref_flags { struct ref_iterator { struct ref_iterator_vtable *vtable; const char *refname; + const char *referent; const struct object_id *oid; unsigned int flags; }; |
