X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=oidset.h;h=01f6560283c38660a010ab84d90c24c9a0219189;hb=a208ec1f0b654390ad06372c53b7ffe785052d98;hp=209ae7a1736e49818acc1e05b7f3cb4aceada0fe;hpb=6361eb73c6dc147e94b02673f387c0345d8d15d2;p=thirdparty%2Fgit.git diff --git a/oidset.h b/oidset.h index 209ae7a173..01f6560283 100644 --- a/oidset.h +++ b/oidset.h @@ -73,6 +73,15 @@ void oidset_clear(struct oidset *set); */ void oidset_parse_file(struct oidset *set, const char *path); +/* + * Similar to the above, but with a callback which can (1) return non-zero to + * signal displeasure with the object and (2) replace object ID with something + * else (meant to be used to "peel"). + */ +typedef int (*oidset_parse_tweak_fn)(struct object_id *, void *); +void oidset_parse_file_carefully(struct oidset *set, const char *path, + oidset_parse_tweak_fn fn, void *cbdata); + struct oidset_iter { kh_oid_set_t *set; khiter_t iter;