On Mon, Sep 26, 2016 at 10:10:46AM -0700, Junio C Hamano wrote:
> > struct disambiguate_state {
> > int len; /* length of prefix in hex chars */
> > - char hex_pfx[GIT_SHA1_HEXSZ];
> > + char hex_pfx[GIT_SHA1_HEXSZ + 1];
> > unsigned char bin_pfx[GIT_SHA1_RAWSZ];
> >
> >
Jeff King writes:
> We store the hex prefix in a 40-byte buffer with the prefix
> itself followed by 40-minus-len "x" characters. These x's
> serve no purpose, and the lack of NUL termination makes the
> prefix string annoying to use. Let's just terminate it.
> Note that this is
We store the hex prefix in a 40-byte buffer with the prefix
itself followed by 40-minus-len "x" characters. These x's
serve no purpose, and the lack of NUL termination makes the
prefix string annoying to use. Let's just terminate it.
Note that this is in contrast to the binary prefix, which
3 matches
Mail list logo