Re: [PATCH 0/5] tree-walk object_id refactor

2019-01-11 Thread Jeff King
On Fri, Jan 11, 2019 at 12:17:50AM +, brian m. carlson wrote: > > I think this is really the only safe and sane solution. We resisted it > > because of the cost of the extra copies (especially the > > update_tree_entry() one). But I don't know that anybody actually > > measured it. Do you have

Re: [PATCH 0/5] tree-walk object_id refactor

2019-01-10 Thread brian m. carlson
On Thu, Jan 10, 2019 at 01:40:31AM -0500, Jeff King wrote: > On Thu, Jan 10, 2019 at 04:25:46AM +, brian m. carlson wrote: > > > There are a small number of places in our codebase where we cast a > > buffer of unsigned char to a struct object_id pointer. When we have > > GIT_MAX_RAWSZ set to 3

Re: [PATCH 0/5] tree-walk object_id refactor

2019-01-09 Thread Jeff King
On Thu, Jan 10, 2019 at 04:25:46AM +, brian m. carlson wrote: > There are a small number of places in our codebase where we cast a > buffer of unsigned char to a struct object_id pointer. When we have > GIT_MAX_RAWSZ set to 32 (because we have SHA-256), one of these places > (the buffer for tr

[PATCH 0/5] tree-walk object_id refactor

2019-01-09 Thread brian m. carlson
There are a small number of places in our codebase where we cast a buffer of unsigned char to a struct object_id pointer. When we have GIT_MAX_RAWSZ set to 32 (because we have SHA-256), one of these places (the buffer for tree objects) can lead to us copying too much data when using SHA-1 as the ha