do_for_each_ref(): move docstring to the header file

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Michael Haggerty committed Jun 18, 2016 at 06:15 UTC 067622b0e8afde8b39884e221b7a56299036f6d9
2 files changed +9 -10
refs/files-backend.c
-9
@@ -1878,15 +1878,6 @@ static int do_for_each_entry(struct ref_cache *refs, const char *base,
1878 return retval;
1879 }
1880
1881 -/*
1882 - * Call fn for each reference in the specified ref_cache for which the
1883 - * refname begins with base. If trim is non-zero, then trim that many
1884 - * characters off the beginning of each refname before passing the
1885 - * refname to fn. flags can be DO_FOR_EACH_INCLUDE_BROKEN to include
1886 - * broken references in the iteration. If fn ever returns a non-zero
1887 - * value, stop the iteration and return that value; otherwise, return
1888 - * 0.
1889 - */
1881 int do_for_each_ref(const char *submodule, const char *base,
1882 each_ref_fn fn, int trim, int flags, void *cb_data)
1883 {
refs/refs-internal.h
+9 -1
@@ -249,7 +249,15 @@ int rename_ref_available(const char *oldname, const char *newname);
249 #define DO_FOR_EACH_INCLUDE_BROKEN 0x01
250
251 /*
252 - * The common backend for the for_each_*ref* functions
252 + * Call fn for each reference in the specified submodule for which the
253 + * refname begins with base. If trim is non-zero, then trim that many
254 + * characters off the beginning of each refname before passing the
255 + * refname to fn. flags can be DO_FOR_EACH_INCLUDE_BROKEN to include
256 + * broken references in the iteration. If fn ever returns a non-zero
257 + * value, stop the iteration and return that value; otherwise, return
258 + * 0.
259 + *
260 + * This is the common backend for the for_each_*ref* functions.
261 */
262 int do_for_each_ref(const char *submodule, const char *base,
263 each_ref_fn fn, int trim, int flags, void *cb_data);