Subject: Re: [PATCH 3/3] Rework pretty_print_commit to use strbufs instead of custom buffers.

From: Pierre Habouzit <[email-masked]>
Date: Sat, 08 Sep 2007 20:49:07 +0200

On Sat, Sep 08, 2007 at 06:40:08PM +0000, René Scharfe wrote:
> Pierre Habouzit schrieb:
> >   Also remove the "len" parameter, as:
> >   (1) it was used as a max boundary, and every caller used ~0u
> >   (2) we check for final NUL no matter what, so it doesn't help for speed.
> > 
> >   As a result most of the pp_* function takes 3 arguments less, and we need
> > a lot less local variables, this makes the code way more readable, and
> > easier to extend if needed.
> > 
> >   This patch also fixes some spacing and cosmetic issues.
> > 
> > Signed-off-by: Pierre Habouzit <[email-masked]>
> > ---
> >  builtin-branch.c      |   15 +--
> >  builtin-log.c         |   12 +-
> >  builtin-rev-list.c    |   13 +-
> >  builtin-show-branch.c |   13 +-
> >  commit.c              |  330 ++++++++++++++++++-------------------------------
> >  commit.h              |    6 +-
> >  log-tree.c            |   56 +++------
> >  7 files changed, 171 insertions(+), 274 deletions(-)
> 
> Nice!  I wonder if we should #include strbuf.h from git-compat-util.h
> (just like e.g. string.h) instead of from commit.h, in order to have
> strbuf available everywhere in git.
> 
> Please be aware of the changes to commit.c already in next which your
> patch conflicts with: format_commit_message() has been exported and is
> used in builtin-archive.c there.

  Okay, then I'll hope than Junio will merge the first series and then
rebase this one on next. If I'm going to propose more of those patches,
should I write them rather on next or master (like I do now) ?

-- 
·O·  Pierre Habouzit
··O                                                [email-masked]
OOO                                                http://www.madism.org