commit: convert parts to struct object_id

Convert struct commit_graft and necessary local parts of commit.c.
Also, convert several constants based on the hex length of an SHA-1 to
use GIT_SHA1_HEXSZ, and move several magic constants into variables for
readability.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
brian m. carlson
2015-03-13 23:39:34 +00:00
committed by Junio C Hamano
parent 1ff57c13c5
commit 7683e2e6e3
6 changed files with 39 additions and 35 deletions

View File

@ -137,7 +137,7 @@ static int add_ref_decoration(const char *refname, const unsigned char *sha1, in
static int add_graft_decoration(const struct commit_graft *graft, void *cb_data)
{
struct commit *commit = lookup_commit(graft->sha1);
struct commit *commit = lookup_commit(graft->oid.hash);
if (!commit)
return 0;
add_name_decoration(DECORATION_GRAFTED, "grafted", &commit->object);