do_for_each_ref(): move docstring to the header file
authorMichael Haggerty <mhagger@alum.mit.edu>
Sat, 18 Jun 2016 04:15:08 +0000 (06:15 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 20 Jun 2016 18:38:17 +0000 (11:38 -0700)
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs/files-backend.c
refs/refs-internal.h
index bbf96ad83a5abc494fbbd99d2bd9cceef6252e97..8fa897b3b873e5d58a12fb51665d806bbd1476b6 100644 (file)
@@ -1878,15 +1878,6 @@ static int do_for_each_entry(struct ref_cache *refs, const char *base,
        return retval;
 }
 
-/*
- * Call fn for each reference in the specified ref_cache for which the
- * refname begins with base.  If trim is non-zero, then trim that many
- * characters off the beginning of each refname before passing the
- * refname to fn.  flags can be DO_FOR_EACH_INCLUDE_BROKEN to include
- * broken references in the iteration.  If fn ever returns a non-zero
- * value, stop the iteration and return that value; otherwise, return
- * 0.
- */
 int do_for_each_ref(const char *submodule, const char *base,
                    each_ref_fn fn, int trim, int flags, void *cb_data)
 {
index 1bb3d87dc5bdb4f741938a99b850c5a99ee15e2f..b4dd5453ea16e614e3a6d7d13e8ba0578a0c7855 100644 (file)
@@ -249,7 +249,15 @@ int rename_ref_available(const char *oldname, const char *newname);
 #define DO_FOR_EACH_INCLUDE_BROKEN 0x01
 
 /*
- * The common backend for the for_each_*ref* functions
+ * Call fn for each reference in the specified submodule for which the
+ * refname begins with base. If trim is non-zero, then trim that many
+ * characters off the beginning of each refname before passing the
+ * refname to fn. flags can be DO_FOR_EACH_INCLUDE_BROKEN to include
+ * broken references in the iteration. If fn ever returns a non-zero
+ * value, stop the iteration and return that value; otherwise, return
+ * 0.
+ *
+ * This is the common backend for the for_each_*ref* functions.
  */
 int do_for_each_ref(const char *submodule, const char *base,
                    each_ref_fn fn, int trim, int flags, void *cb_data);