[PATCH 3/5] Document how ref iterators and symrefs interact
From: Han-Wen Nienhuys via GitGitGadget <hidden>
Date: 2020-01-23 19:41:27
Subsystem:
the rest · Maintainer:
Linus Torvalds
From: Han-Wen Nienhuys via GitGitGadget <hidden>
Date: 2020-01-23 19:41:27
Subsystem:
the rest · Maintainer:
Linus Torvalds
From: Han-Wen Nienhuys <redacted> Change-Id: Ie3ee63c52254c000ef712986246ca28f312b4301 Signed-off-by: Han-Wen Nienhuys <redacted> --- refs/refs-internal.h | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/refs/refs-internal.h b/refs/refs-internal.h
index ff2436c0fb..fc18b12340 100644
--- a/refs/refs-internal.h
+++ b/refs/refs-internal.h@@ -269,6 +269,9 @@ int refs_rename_ref_available(struct ref_store *refs, * to the next entry, ref_iterator_advance() aborts the iteration, * frees the ref_iterator, and returns ITER_ERROR. * + * Ref iterators cannot return symref targets, so symbolic refs must be + * dereferenced during the iteration. + * * The reference currently being looked at can be peeled by calling * ref_iterator_peel(). This function is often faster than peel_ref(), * so it should be preferred when iterating over references.
--
gitgitgadget