Stefan Beller <sbeller@xxxxxxxxxx> writes: > if (fmt_pretty) > - pretty_print_ref(name, sha1, fmt_pretty); > + pretty_print_ref(name, oid.hash, fmt_pretty); The next step would be to have pretty_print_ref() to take an oid; as there are only two callers to it, both of which pass oid->hash to it, that should be a small and conflict-free conversion. > > - type = sha1_object_info(sha1, NULL); > + type = sha1_object_info(oid->hash, NULL); sha1_object_info() has a handful of callers that do not pass the pointer to the hash field in an existing oid object, but it does not look too bad as a candidate for conversion. > if (!buf) > return error("%s: unable to read file.", > name_to_report ? > name_to_report : > - find_unique_abbrev(sha1, DEFAULT_ABBREV)); > + find_unique_abbrev(oid->hash, DEFAULT_ABBREV)); So does find_unique_abbrev(). Overall both patches look good. Thanks.