Skip to content

Commit c2f9b15

Browse files
hanwengitster
authored andcommitted
refs: document how ref_iterator_advance_fn should handle symrefs
Signed-off-by: Han-Wen Nienhuys <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent cebf643 commit c2f9b15

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

refs/refs-internal.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,11 @@ void base_ref_iterator_free(struct ref_iterator *iter);
438438

439439
/* Virtual function declarations for ref_iterators: */
440440

441+
/*
442+
* backend-specific implementation of ref_iterator_advance.
443+
* For symrefs, the function should set REF_ISSYMREF, and it should also dereference
444+
* the symref to provide the OID referent.
445+
*/
441446
typedef int ref_iterator_advance_fn(struct ref_iterator *ref_iterator);
442447

443448
typedef int ref_iterator_peel_fn(struct ref_iterator *ref_iterator,

0 commit comments

Comments
 (0)