Skip to content

Commit e186057

Browse files
mhaggergitster
authored andcommitted
ref_iterator_begin_fn(): fix docstring
The iterator returned by this function only includes references whose names start with the whole prefix, not all of those in `find_containing_dir(prefix)` as the old docstring claimed. This docstring was probably copy-pasted from old ref-cache code, which had the old specification. But now, `cache_ref_iterator_begin()` (from which the files reference iterator gets its values) automatically wraps its output using `prefix_ref_iterator_begin()` when necessary, so it has the stricter behavior. Signed-off-by: Michael Haggerty <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent fd2ce9c commit e186057

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

refs/refs-internal.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -515,9 +515,10 @@ typedef int rename_ref_fn(struct ref_store *ref_store,
515515
const char *logmsg);
516516

517517
/*
518-
* Iterate over the references in the specified ref_store that are
519-
* within find_containing_dir(prefix). If prefix is NULL or the empty
520-
* string, iterate over all references in the submodule.
518+
* Iterate over the references in `ref_store` whose names start with
519+
* `prefix`. `prefix` is matched as a literal string, without regard
520+
* for path separators. If prefix is NULL or the empty string, iterate
521+
* over all references in `ref_store`.
521522
*/
522523
typedef struct ref_iterator *ref_iterator_begin_fn(
523524
struct ref_store *ref_store,

0 commit comments

Comments
 (0)