]> git.ipfire.org Git - thirdparty/git.git/commitdiff
ref_iterator_begin_fn(): fix docstring
authorMichael Haggerty <mhagger@alum.mit.edu>
Mon, 22 May 2017 14:17:33 +0000 (16:17 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 23 May 2017 05:29:52 +0000 (14:29 +0900)
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 <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs/refs-internal.h

index b6b291cf00e5cf0403b4168eca90d5f67bd65c0d..7020e51cb7c0a321e28591f6c397cfc3d15e0398 100644 (file)
@@ -515,9 +515,10 @@ typedef int rename_ref_fn(struct ref_store *ref_store,
                          const char *logmsg);
 
 /*
- * Iterate over the references in the specified ref_store that are
- * within find_containing_dir(prefix). If prefix is NULL or the empty
- * string, iterate over all references in the submodule.
+ * Iterate over the references in `ref_store` whose names start with
+ * `prefix`. `prefix` is matched as a literal string, without regard
+ * for path separators. If prefix is NULL or the empty string, iterate
+ * over all references in `ref_store`.
  */
 typedef struct ref_iterator *ref_iterator_begin_fn(
                struct ref_store *ref_store,