Re: [PATCH v3 2/4] commit: replace the raw buffer with strbuf in read_graft_line

2017-08-18 Thread Jeff King
On Fri, Aug 18, 2017 at 12:12:37PM +0200, Patryk Obara wrote: > Jeff King wrote: > > > AFAICT this is only here to avoid having to s/buf/line->buf/ in the rest > > of the function. But I think we should just make that change (you > > already did in some of the spots). And IMHO we should do the s

Re: [PATCH v3 2/4] commit: replace the raw buffer with strbuf in read_graft_line

2017-08-18 Thread Patryk Obara
Jeff King wrote: > AFAICT this is only here to avoid having to s/buf/line->buf/ in the rest > of the function. But I think we should just make that change (you > already did in some of the spots). And IMHO we should do the same for > line->len. When there are two names for the same value, it incr

Re: [PATCH v3 2/4] commit: replace the raw buffer with strbuf in read_graft_line

2017-08-17 Thread Jeff King
On Fri, Aug 18, 2017 at 03:59:36AM +0200, Patryk Obara wrote: > diff --git a/commit.c b/commit.c > index 8b28415..019e733 100644 > --- a/commit.c > +++ b/commit.c > @@ -134,17 +134,18 @@ int register_commit_graft(struct commit_graft *graft, > int ignore_dups) > return 0; > } > > -struct

[PATCH v3 2/4] commit: replace the raw buffer with strbuf in read_graft_line

2017-08-17 Thread Patryk Obara
This simplifies function declaration and allows for use of strbuf_rtrim instead of modifying buffer directly. Signed-off-by: Patryk Obara --- builtin/blame.c | 2 +- commit.c| 15 --- commit.h| 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/bu