refs.h: add a note about sorting order of for_each_ref_*

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Nguyễn Thái Ngọc Duy
2017-03-26 09:42:41 +07:00
committed by Junio C Hamano
parent 2269e2a878
commit adac8115a6
3 changed files with 14 additions and 2 deletions

4
refs.h
View File

@ -230,7 +230,7 @@ typedef int each_ref_fn(const char *refname,
* it is not safe to modify references while an iteration is in
* progress, unless the same callback function invocation that
* modifies the reference also returns a nonzero value to immediately
* stop the iteration.
* stop the iteration. Returned references are sorted.
*/
int refs_for_each_ref(struct ref_store *refs,
each_ref_fn fn, void *cb_data);
@ -370,7 +370,7 @@ int for_each_reflog_ent_reverse(const char *refname, each_reflog_ent_fn fn, void
/*
* Calls the specified function for each reflog file until it returns nonzero,
* and returns the value
* and returns the value. Reflog file order is unspecified.
*/
int refs_for_each_reflog(struct ref_store *refs, each_ref_fn fn, void *cb_data);
int for_each_reflog(each_ref_fn fn, void *cb_data);