diff options
| author | Junio C Hamano <gitster@pobox.com> | 2021-02-03 15:04:49 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2021-02-03 15:04:49 -0800 |
| commit | 973e20b83f38d0a640d4e0478ddbd50dfa98daf1 (patch) | |
| tree | 6cf89c7e061f25e00153b64af2dc1736c98337f9 /refs.h | |
| parent | 6cd7f9dc297d096e5b7787db8d0ad8ca05a1b296 (diff) | |
| parent | 36a317929b8f0c67d77d54235f2d20751c576cbb (diff) | |
| download | git-973e20b83f38d0a640d4e0478ddbd50dfa98daf1.tar.xz | |
Merge branch 'jk/peel-iterated-oid'
The peel_ref() API has been replaced with peel_iterated_oid().
* jk/peel-iterated-oid:
refs: switch peel_ref() to peel_iterated_oid()
Diffstat (limited to 'refs.h')
| -rw-r--r-- | refs.h | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -118,16 +118,16 @@ int is_branch(const char *refname); int refs_init_db(struct strbuf *err); /* - * If refname is a non-symbolic reference that refers to a tag object, - * and the tag can be (recursively) dereferenced to a non-tag object, - * store the object ID of the referred-to object to oid and return 0. - * If any of these conditions are not met, return a non-zero value. - * Symbolic references are considered unpeelable, even if they - * ultimately resolve to a peelable tag. + * Return the peeled value of the oid currently being iterated via + * for_each_ref(), etc. This is equivalent to calling: + * + * peel_object(oid, &peeled); + * + * with the "oid" value given to the each_ref_fn callback, except + * that some ref storage may be able to answer the query without + * actually loading the object in memory. */ -int refs_peel_ref(struct ref_store *refs, const char *refname, - struct object_id *oid); -int peel_ref(const char *refname, struct object_id *oid); +int peel_iterated_oid(const struct object_id *base, struct object_id *peeled); /** * Resolve refname in the nested "gitlink" repository in the specified |
