diff options
author | David Turner <dturner@twopensource.com> | 2016-04-07 15:02:49 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-04-10 11:34:55 -0700 |
commit | 937705901b83737a35996f62dbfbfefd8e5c8d7f (patch) | |
tree | 54e1be300c75deb21b7d3b650e589dcafde65ebd /refs/refs-internal.h | |
parent | refs: move head_ref{,_submodule} to the common code (diff) | |
download | tgif-937705901b83737a35996f62dbfbfefd8e5c8d7f.tar.xz |
refs: move for_each_*ref* functions into common code
Make do_for_each_ref take a submodule as an argument instead of a
ref_cache. Since all for_each_*ref* functions are defined in terms of
do_for_each_ref, we can then move them into the common code.
Later, we can simply make do_for_each_ref into a backend function.
Signed-off-by: David Turner <dturner@twopensource.com>
Reviewed-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs/refs-internal.h')
-rw-r--r-- | refs/refs-internal.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/refs/refs-internal.h b/refs/refs-internal.h index c7dded35f4..92aae80c21 100644 --- a/refs/refs-internal.h +++ b/refs/refs-internal.h @@ -197,4 +197,13 @@ const char *find_descendant_ref(const char *dirname, int rename_ref_available(const char *oldname, const char *newname); + +/* Include broken references in a do_for_each_ref*() iteration: */ +#define DO_FOR_EACH_INCLUDE_BROKEN 0x01 + +/* + * 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); #endif /* REFS_REFS_INTERNAL_H */ |