Rename objectname field to oid in struct ref_array_item. We usually use objectname word for string representation of object id, so oid explains the content better. Signed-off-by: Olga Telezhnaia <olyatelezhnaya@xxxxxxxxx> --- builtin/ls-remote.c | 2 +- ref-filter.c | 8 ++++---- ref-filter.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/builtin/ls-remote.c b/builtin/ls-remote.c index 1d7f1f5ce2783..ce79aede726c7 100644 --- a/builtin/ls-remote.c +++ b/builtin/ls-remote.c @@ -143,7 +143,7 @@ int cmd_ls_remote(int argc, const char **argv, const char *prefix) const struct ref_array_item *ref = ref_array.items[i]; if (show_symref_target && ref->symref) printf("ref: %s\t%s\n", ref->symref, ref->refname); - printf("%s\t%s\n", oid_to_hex(&ref->objectname), ref->refname); + printf("%s\t%s\n", oid_to_hex(&ref->oid), ref->refname); status = 0; /* we found something */ } diff --git a/ref-filter.c b/ref-filter.c index 422a9c9ae3fd2..736e1f9cc38fc 100644 --- a/ref-filter.c +++ b/ref-filter.c @@ -1615,7 +1615,7 @@ static int populate_value(struct ref_array_item *ref, struct strbuf *err) v->s = xstrdup(buf + 1); } continue; - } else if (!deref && grab_objectname(name, &ref->objectname, v, atom)) { + } else if (!deref && grab_objectname(name, &ref->oid, v, atom)) { continue; } else if (!strcmp(name, "HEAD")) { if (atom->u.head && !strcmp(ref->refname, atom->u.head)) @@ -1661,7 +1661,7 @@ static int populate_value(struct ref_array_item *ref, struct strbuf *err) struct atom_value *v = &ref->value[i]; if (v->s == NULL && used_atom[i].source == SOURCE_NONE) return strbuf_addf_ret(err, -1, _("missing object %s for %s"), - oid_to_hex(&ref->objectname), ref->refname); + oid_to_hex(&ref->oid), ref->refname); } if (need_tagged) @@ -1671,7 +1671,7 @@ static int populate_value(struct ref_array_item *ref, struct strbuf *err) return 0; - oi.oid = ref->objectname; + oi.oid = ref->oid; if (get_object(ref, 0, &obj, &oi, err)) return -1; @@ -1898,7 +1898,7 @@ static struct ref_array_item *new_ref_array_item(const char *refname, struct ref_array_item *ref; FLEX_ALLOC_STR(ref, refname, refname); - oidcpy(&ref->objectname, oid); + oidcpy(&ref->oid, oid); return ref; } diff --git a/ref-filter.h b/ref-filter.h index 85c8ebc3b904e..4d7d36e9f522d 100644 --- a/ref-filter.h +++ b/ref-filter.h @@ -34,7 +34,7 @@ struct ref_sorting { }; struct ref_array_item { - struct object_id objectname; + struct object_id oid; int flag; unsigned int kind; const char *symref; -- https://github.com/git/git/pull/568