diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2015-11-10 02:22:29 +0000 |
---|---|---|
committer | Jeff King <peff@peff.net> | 2015-11-20 08:02:05 -0500 |
commit | ed1c9977cb1b63e4270ad8bdf967a2d02580aa08 (patch) | |
tree | f5b52ccae09103672c62c1c11ff0bddc78199829 /pretty.c | |
parent | f2fd0760f62e79609fef7bfd7ecebb002e8e4ced (diff) | |
download | git-ed1c9977cb1b63e4270ad8bdf967a2d02580aa08.tar.gz |
Remove get_object_hash.
Convert all instances of get_object_hash to use an appropriate reference
to the hash member of the oid member of struct object. This provides no
functional change, as it is essentially a macro substitution.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Jeff King <peff@peff.net>
Diffstat (limited to 'pretty.c')
-rw-r--r-- | pretty.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -543,7 +543,7 @@ static void add_merge_info(const struct pretty_print_context *pp, struct commit *p = parent->item; const char *hex = NULL; if (pp->abbrev) - hex = find_unique_abbrev(get_object_hash(p->object), pp->abbrev); + hex = find_unique_abbrev(p->object.oid.hash, pp->abbrev); if (!hex) hex = oid_to_hex(&p->object.oid); parent = parent->next; @@ -1119,7 +1119,7 @@ static size_t format_commit_one(struct strbuf *sb, /* in UTF-8 */ /* these depend on the commit */ if (!commit->object.parsed) - parse_object(get_object_hash(commit->object)); + parse_object(commit->object.oid.hash); switch (placeholder[0]) { case 'H': /* commit hash */ @@ -1133,7 +1133,7 @@ static size_t format_commit_one(struct strbuf *sb, /* in UTF-8 */ strbuf_addstr(sb, diff_get_color(c->auto_color, DIFF_RESET)); return 1; } - strbuf_addstr(sb, find_unique_abbrev(get_object_hash(commit->object), + strbuf_addstr(sb, find_unique_abbrev(commit->object.oid.hash, c->pretty_ctx->abbrev)); strbuf_addstr(sb, diff_get_color(c->auto_color, DIFF_RESET)); c->abbrev_commit_hash.len = sb->len - c->abbrev_commit_hash.off; @@ -1162,7 +1162,7 @@ static size_t format_commit_one(struct strbuf *sb, /* in UTF-8 */ if (p != commit->parents) strbuf_addch(sb, ' '); strbuf_addstr(sb, find_unique_abbrev( - get_object_hash(p->item->object), + p->item->object.oid.hash, c->pretty_ctx->abbrev)); } c->abbrev_parent_hashes.len = sb->len - |