match-trees: compute buffer offset correctly when splicing
authorbrian m. carlson <sandals@crustytoothpaste.net>
Tue, 15 Jan 2019 00:39:42 +0000 (00:39 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 15 Jan 2019 17:57:41 +0000 (09:57 -0800)
commit36775ab524a1d180aaaac089e25b5aeb87793a17
tree7edeb9206226bfeac21298e834a7f9e30656b8ad
parent0a3faa45b1d35b227182166769357e0878da8f92
match-trees: compute buffer offset correctly when splicing

Currently, the struct object_id pointer returned from tree_entry_extract
lives directly inside the parsed tree buffer. In a future commit, this
will change so that it instead points to a dedicated struct member.
Since in this code path, we want to modify the buffer directly, compute
the buffer offset we want to modify by using the pointer to the path
instead.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
match-trees.c