git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] combine-diff: coalesce lost lines optimally

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 17, 2013, 22:37 UTC
Message-ID
<7vhak9ps8w.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1363525436-21667-1-git-send-email-apelisse@gmail.com>
Antoine Pelisse <apelisse@gmail.com> writes:
Show 5 quoted lines
> +/* 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).

Previous: Antoine PelisseNext: Antoine Pelisse
Message 8 of 9 in “[RFD] Combine diff improvements”
  1. Antoine PelisseMar 14, 2013
  2. Junio C HamanoMar 14, 2013
  3. Junio C HamanoMar 15, 2013
  4. combine-diff: coalesce lost lines optimallyAntoine Pelisse, Mar 17, 2013
  5. Antoine PelisseMar 17, 2013
  6. Junio C HamanoMar 17, 2013
  7. Antoine PelisseMar 17, 2013
  8. Junio C HamanoMar 17, 2013
  9. combine-diff: coalesce lost lines optimallyAntoine Pelisse, Mar 23, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.