diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-03-05 09:44:44 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-03-05 09:44:44 -0800 |
| commit | d037212d973351ced4a3f0bb0705575bee4f8566 (patch) | |
| tree | 34c0fc73c87850a10df780c5c6a4ecc446be7b6b /refs.h | |
| parent | 661f3797916d2bc3bd967a9dc9e6e464d5343758 (diff) | |
| parent | 33d15b54358d8ec7fc0bd70062ddd1116402c8fe (diff) | |
| download | git-d037212d973351ced4a3f0bb0705575bee4f8566.tar.xz | |
Merge branch 'kn/for-all-refs'
"git for-each-ref" learned "--include-root-refs" option to show
even the stuff outside the 'refs/' hierarchy.
* kn/for-all-refs:
for-each-ref: add new option to include root refs
ref-filter: rename 'FILTER_REFS_ALL' to 'FILTER_REFS_REGULAR'
refs: introduce `refs_for_each_include_root_refs()`
refs: extract out `loose_fill_ref_dir_regular_file()`
refs: introduce `is_pseudoref()` and `is_headref()`
Diffstat (limited to 'refs.h')
| -rw-r--r-- | refs.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -399,6 +399,12 @@ int refs_for_each_rawref(struct ref_store *refs, each_ref_fn fn, void *cb_data); int for_each_rawref(each_ref_fn fn, void *cb_data); /* + * Iterates over all refs including root refs, i.e. pseudorefs and HEAD. + */ +int refs_for_each_include_root_refs(struct ref_store *refs, each_ref_fn fn, + void *cb_data); + +/* * Normalizes partial refs to their fully qualified form. * Will prepend <prefix> to the <pattern> if it doesn't start with 'refs/'. * <prefix> will default to 'refs/' if NULL. @@ -1043,4 +1049,7 @@ extern struct ref_namespace_info ref_namespace[NAMESPACE__COUNT]; */ void update_ref_namespace(enum ref_namespace namespace, char *ref); +int is_pseudoref(struct ref_store *refs, const char *refname); +int is_headref(struct ref_store *refs, const char *refname); + #endif /* REFS_H */ |
