Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] don't use mmap() to hash files

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:48:14

Johannes Schindelin [off-list ref] writes:
And even if you could be certain, a hint is missing that strbuf_read(), 
its name notwithstanding, does not read NUL-terminated strings. Oh, and 
the size is just a hint for the initial size, and it reads until EOF. That 
has to be said in the commit message.
It is healthy to ask for explanation, especially when the patch cannot
justify itself by reading only the diff but reviewer needs to check the
surrounding code.

I however think you are asking a little too much in this particular case.
That strbuf_read() code is exactly the same as in used for "reading from
pipe and we don't know how big it is" case in the original code.  You can
see it in the lines deleted by the patch.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help