struct tag *t = (struct tag *) o;
if (!t->tagged)
break; /* broken repository */
- o = parse_object(get_object_hash(*t->tagged));
+ o = parse_object(t->tagged->oid.hash);
deref = 1;
}
if (o && o->type == OBJ_COMMIT) {
tip_table.sorted = 1;
}
- found = sha1_pos(get_object_hash(*o), tip_table.table, tip_table.nr,
+ found = sha1_pos(o->oid.hash, tip_table.table, tip_table.nr,
nth_tip_table_ent);
if (0 <= found)
return tip_table.table[found].refname;
int always, int allow_undefined, int name_only)
{
const char *name;
- const unsigned char *sha1 = get_object_hash(*obj);
+ const struct object_id *oid = &obj->oid;
if (!name_only)
- printf("%s ", caller_name ? caller_name : sha1_to_hex(sha1));
+ printf("%s ", caller_name ? caller_name : oid_to_hex(oid));
name = get_rev_name(obj);
if (name)
printf("%s\n", name);
else if (allow_undefined)
printf("undefined\n");
else if (always)
- printf("%s\n", find_unique_abbrev(sha1, DEFAULT_ABBREV));
+ printf("%s\n", find_unique_abbrev(oid->hash, DEFAULT_ABBREV));
else
- die("cannot describe '%s'", sha1_to_hex(sha1));
+ die("cannot describe '%s'", oid_to_hex(oid));
}
static char const * const name_rev_usage[] = {