Elijah Conners <business@xxxxxxxxxxxxxx> writes: > Junio C Hamano <gitster@xxxxxxxxx> writes: > > Do we have any hard guidance like "do not pass an data item whose > > size is larger than 64 bytes" in our coding guidelines? If not, > > make sure that the reference to 64 bytes does not look like one. > While we don't have hard guidance like that, putting an object that exceeds 64 bytes on the stack is dangerous. > > > In any case, wouldn't it make sense to make the "we pass reference > > not because we want to let the callee modify the value, but because > > the callee deep in the callchain wants to copy the contents out of > > it" parameter a pointer to a constant? > Yes. I overlooked that making this change. Feel free to make that change, otherwise I'll do it myself. OK, will wait for an updated patch that corrects the proposed log message (i.e. not to say "size is larger than 64 bytes hence this is bad") with a const pointer. Note that this project tries to avoid piling "oops the previous one was wrong, and this is a fix" patches on top of earlier patch that are faulty or suboptimal. Instead "v2" and later patches are written as if an earlier iteration never happened, i.e. allowing the author to pretend to be perfect human ;-). Thanks.