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

Re: [PATCH 2/2] Teach "delta" attribute to pack-objects.

From
Nicolas Pitre <nico@cam.org>
Date
May 22, 2007, 16:04 UTC
Message-ID
<alpine.LFD.0.99.0705221200010.3366@xanadu.home>
In-Reply-To
<11795608922961-git-send-email-junkio@cox.net>
On Sat, 19 May 2007, Junio C Hamano wrote:
> This teaches pack-objects to use .gitattributes mechanism so
> that the user can specify certain blobs are not worth spending
> CPU cycles to attempt deltification.
[...]
Show 20 quoted lines
> @@ -1349,6 +1376,10 @@ static void find_deltas(struct object_entry **list, int window, int depth)
>  
>  		if (entry->size < 50)
>  			continue;
> +
> +		if (entry->no_try_delta)
> +			continue;
> +
>  		free_delta_index(n->index);
>  		n->index = NULL;
>  		free(n->data);
> @@ -1376,6 +1407,8 @@ static void find_deltas(struct object_entry **list, int window, int depth)
>  			m = array + other_idx;
>  			if (!m->entry)
>  				break;
> +			if (m->entry->no_try_delta)
> +				continue;
>  			if (try_delta(n, m, max_depth) < 0)
>  				break;
>  		}

This last hunk is unnecessary. Because of the other hunk above, the no_try_delta objects will never get into the m array.

Well done otherwise.  This attribute thing is really nice.
Nicolas
Previous: Dana How
Message 6 of 6 in “pack-objects: pass fullname down to add_object_entry()”
  1. 1/2 pack-objects: pass fullname down to add_object_entry()Junio C Hamano, May 19, 2007
  2. 2/2 Teach "delta" attribute to pack-objects.Junio C Hamano, May 19, 2007
  3. Dana HowMay 19, 2007
  4. Junio C HamanoMay 19, 2007
  5. Dana HowMay 19, 2007
  6. Nicolas PitreMay 22, 2007

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.