diff_aligned_abbrev: use "struct oid"

Since we're modifying this function anyway, it's a good time
to update it to the more modern "struct oid". We can also
drop some of the magic numbers in favor of GIT_SHA1_HEXSZ,
along with some descriptive comments.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jeff King
2016-10-20 02:20:07 -04:00
committed by Junio C Hamano
parent d5e3b01e5b
commit d6cece51b8
3 changed files with 14 additions and 12 deletions

View File

@ -1203,9 +1203,9 @@ static void show_raw_diff(struct combine_diff_path *p, int num_parent, struct re
/* Show sha1's */
for (i = 0; i < num_parent; i++)
printf(" %s", diff_aligned_abbrev(p->parent[i].oid.hash,
printf(" %s", diff_aligned_abbrev(&p->parent[i].oid,
opt->abbrev));
printf(" %s ", diff_aligned_abbrev(p->oid.hash, opt->abbrev));
printf(" %s ", diff_aligned_abbrev(&p->oid, opt->abbrev));
}
if (opt->output_format & (DIFF_FORMAT_RAW | DIFF_FORMAT_NAME_STATUS)) {