diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2015-11-10 02:22:28 +0000 |
---|---|---|
committer | Jeff King <peff@peff.net> | 2015-11-20 08:02:05 -0500 |
commit | f2fd0760f62e79609fef7bfd7ecebb002e8e4ced (patch) | |
tree | 1f915114b015428730e95a89697783560b672008 /builtin/name-rev.c | |
parent | 7999b2cf772956466baa8925491d6fb1b0963292 (diff) | |
download | git-f2fd0760f62e79609fef7bfd7ecebb002e8e4ced.tar.gz |
Convert struct object to object_id
struct object is one of the major data structures dealing with object
IDs. Convert it to use struct object_id instead of an unsigned char
array. Convert get_object_hash to refer to the new member as well.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Jeff King <peff@peff.net>
Diffstat (limited to 'builtin/name-rev.c')
-rw-r--r-- | builtin/name-rev.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/builtin/name-rev.c b/builtin/name-rev.c index cac66a5891..49e6e91b15 100644 --- a/builtin/name-rev.c +++ b/builtin/name-rev.c @@ -232,19 +232,19 @@ static void show_name(const struct object *obj, 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[] = { |