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

Re: [PATCH] relax delta selection filtering in pack-objects

From
Nicolas Pitre <nico@cam.org>
Date
Feb 22, 2006, 16:04 UTC
Message-ID
<Pine.LNX.4.64.0602221058320.5606@localhost.localdomain>
In-Reply-To
<7vhd6rsvqd.fsf@assigned-by-dhcp.cox.net>
On Tue, 21 Feb 2006, Junio C Hamano wrote:
Show 10 quoted lines
> Junio C Hamano <junkio@cox.net> writes:
> 
> > I haven't dug into the issue yet, but these four delta series
> > seem to break the testsuite.
> 
> I bisected.  It is the adler32 one -- since it makes the
> generated delta much smaller, it is understandable that it would
> interact with the break/rename heuristics.  It is not strictly
> breakage in that sense -- we just need to readjust the
> heuristics thresholds for those algorithms.

I had a quick look and that code rather looks like black magic to me atm. I however found a memory leak in diffcore-rename.c:estimate_similarity():

        delta = diff_delta(src->data, src->size,
                           dst->data, dst->size,
                           &delta_size, delta_limit);
        if (!delta)
                /* If delta_limit is exceeded, we have too much differences */
                return 0;
        /* A delta that has a lot of literal additions would have
         * big delta_size no matter what else it does.
         */
        if (base_size * (MAX_SCORE-minimum_score) < delta_size * MAX_SCORE)
                return 0;
                   \________ delta memory is leaked.
Nicolas
Previous: Junio C Hamano
Message 4 of 4 in “relax delta selection filtering in pack-objects”
  1. relax delta selection filtering in pack-objectsNicolas Pitre, Feb 22, 2006
  2. Junio C HamanoFeb 22, 2006
  3. Junio C HamanoFeb 22, 2006
  4. Nicolas PitreFeb 22, 2006

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.