builtin/diff-tree: convert to struct object_id
commit5f5e936d4a2d9a9093e8e6a2501fad74bdc6c31c
authorbrian m. carlson <sandals@crustytoothpaste.net>
Tue, 21 Feb 2017 23:47:21 +0000 (21 23:47 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 22 Feb 2017 18:12:15 +0000 (22 10:12 -0800)
treefa5d09cfb08ab5dbbb0d7c35bcf1a07ba77a30a1
parent8066df4194a1b108d2a7200008c39a1dcfebd8df
builtin/diff-tree: convert to struct object_id

Convert most leaf functions to struct object_id.  Change several
hardcoded numbers to uses of parse_oid_hex.  In doing so, verify that we
when we want two trees, we have exactly two trees.

Finally, in stdin_diff_commit, avoid accessing the byte after the NUL.
This will be a NUL as well, since the first NUL was a newline we
overwrote.  However, with parse_oid_hex, we no longer need to increment
the pointer directly, and can simply increment it as part of our check
for the space character.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/diff-tree.c