Re: [PATCH] builtin-apply: use strbuf's instead of buffer_desc's.
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 16, 2007, 00:56 UTC
- Message-ID
- <7v4phv8m26.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <20070915141340.334CA4C152@madism.org>
Pierre Habouzit <madcoder@debian.org> writes:
> 1 files changed, 73 insertions(+), 130 deletions(-)
Nice reduction.
Show 8 quoted lines
> - } > - return got != size; > + > + nsize = buf->len; > + nbuf = convert_to_git(path, buf->buf, &nsize); > + if (nbuf) > + strbuf_embed(buf, nbuf, nsize, nsize); > + return 0;
I suspect that changing the convert_to_git() interface to work on strbuf instead of (char*, size_t *) pair might make things simpler and easier.