mirror of
https://github.com/git/git.git
synced 2026-01-10 01:56:42 +00:00
Merge branch 'ps/ref-peeled-tags'
Some ref backend storage can hold not just the object name of an annotated tag, but the object name of the object the tag points at. The code to handle this information has been streamlined. * ps/ref-peeled-tags: t7004: do not chdir around in the main process ref-filter: fix stale parsed objects ref-filter: parse objects on demand ref-filter: detect broken tags when dereferencing them refs: don't store peeled object IDs for invalid tags object: add flag to `peel_object()` to verify object type refs: drop infrastructure to peel via iterators refs: drop `current_ref_iter` hack builtin/show-ref: convert to use `reference_get_peeled_oid()` ref-filter: propagate peeled object ID upload-pack: convert to use `reference_get_peeled_oid()` refs: expose peeled object ID via the iterator refs: refactor reference status flags refs: fully reset `struct ref_iterator::ref` on iteration refs: introduce `.ref` field for the base iterator refs: introduce wrapper struct for `each_ref_fn`
This commit is contained in:
@@ -1446,18 +1446,16 @@ struct handle_one_ref_cb {
|
||||
struct commit_list **list;
|
||||
};
|
||||
|
||||
static int handle_one_ref(const char *path, const char *referent UNUSED, const struct object_id *oid,
|
||||
int flag UNUSED,
|
||||
void *cb_data)
|
||||
static int handle_one_ref(const struct reference *ref, void *cb_data)
|
||||
{
|
||||
struct handle_one_ref_cb *cb = cb_data;
|
||||
struct commit_list **list = cb->list;
|
||||
struct object *object = parse_object(cb->repo, oid);
|
||||
struct object *object = parse_object(cb->repo, ref->oid);
|
||||
if (!object)
|
||||
return 0;
|
||||
if (object->type == OBJ_TAG) {
|
||||
object = deref_tag(cb->repo, object, path,
|
||||
strlen(path));
|
||||
object = deref_tag(cb->repo, object, ref->name,
|
||||
strlen(ref->name));
|
||||
if (!object)
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user