From: Junio C Hamano Date: Sun, 17 Mar 2013 22:37:51 GMT Subject: Re: [PATCH] combine-diff: coalesce lost lines optimally Message-ID: <7vhak9ps8w.fsf@alter.siamese.dyndns.org> In-Reply-To: <1363525436-21667-1-git-send-email-apelisse@gmail.com> Antoine Pelisse writes: > +/* Coalesce new lines into base by finding LCS */ > +static struct lline *coalesce_lines(struct lline *base, int *lenbase, > + struct lline *new, int lennew, > + unsigned long parent) > +{ Don't you want to pass flags so that you can use match_string_spaces() at places like this: > + for (i = 1, baseend = base; i < origbaselen + 1; i++) { > + for (j = 1, newend = new; j < lennew + 1; j++) { > + if (baseend->len == newend->len && > + !memcmp(baseend->line, newend->line, baseend->len)) { IOW, it looks to me that this wants to be rebuilt on top of fa04ae0be8cc (Allow combined diff to ignore white-spaces, 2013-03-14).