diff options
| author | Junio C Hamano <gitster@pobox.com> | 2019-09-30 13:19:29 +0900 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2019-09-30 13:19:29 +0900 |
| commit | cf861cd7a018481e8323444d29fe9e6b73c19a06 (patch) | |
| tree | 854763ac66980d68f83300660e4a88a5c0cc2d23 /ref-filter.c | |
| parent | Merge branch 'en/filter-branch-deprecation' (diff) | |
| parent | use get_tagged_oid() (diff) | |
| download | git-cf861cd7a018481e8323444d29fe9e6b73c19a06.tar.gz git-cf861cd7a018481e8323444d29fe9e6b73c19a06.zip | |
Merge branch 'rs/get-tagged-oid'
Code cleanup.
* rs/get-tagged-oid:
use get_tagged_oid()
tag: factor out get_tagged_oid()
Diffstat (limited to 'ref-filter.c')
| -rw-r--r-- | ref-filter.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ref-filter.c b/ref-filter.c index 7338cfc671..220e9bd74a 100644 --- a/ref-filter.c +++ b/ref-filter.c @@ -1766,7 +1766,7 @@ static int populate_value(struct ref_array_item *ref, struct strbuf *err) * If it is a tag object, see if we use a value that derefs * the object, and if we do grab the object it refers to. */ - oi_deref.oid = ((struct tag *)obj)->tagged->oid; + oi_deref.oid = *get_tagged_oid((struct tag *)obj); /* * NEEDSWORK: This derefs tag only once, which @@ -1997,7 +1997,7 @@ static const struct object_id *match_points_at(struct oid_array *points_at, if (!obj) die(_("malformed object at '%s'"), refname); if (obj->type == OBJ_TAG) - tagged_oid = &((struct tag *)obj)->tagged->oid; + tagged_oid = get_tagged_oid((struct tag *)obj); if (tagged_oid && oid_array_lookup(points_at, tagged_oid) >= 0) return tagged_oid; return NULL; |
