[3/5] Document how ref iterators and symrefs interact
diff mbox series

Message ID 1a01e0b1b5057fb34e4d8ca78d906925ee9141b5.1579808479.git.gitgitgadget@gmail.com
State New
Headers show
Series
  • Reftable support git-core
Related show

Commit Message

Hariom Verma via GitGitGadget Jan. 23, 2020, 7:41 p.m. UTC
From: Han-Wen Nienhuys <hanwen@google.com>

Change-Id: Ie3ee63c52254c000ef712986246ca28f312b4301
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
---
 refs/refs-internal.h | 3 +++
 1 file changed, 3 insertions(+)

Patch
diff mbox series

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.