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

Re: [PATCH] [RFC] Making use of bitmaps for thin objects

From
Jeff King <peff@peff.net>
Date
Jan 6, 2014, 20:38 UTC
Message-ID
<20140106203847.GA643@sigill.intra.peff.net>
In-Reply-To
<20140106145723.GA15489@sigill.intra.peff.net>
On Mon, Jan 06, 2014 at 09:57:23AM -0500, Jeff King wrote:
Show 22 quoted lines
> diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
> index c733379..0cff874 100644
> --- a/builtin/pack-objects.c
> +++ b/builtin/pack-objects.c
> @@ -1402,6 +1402,19 @@ static void check_object(struct object_entry *entry)
>  			base_entry->delta_child = entry;
>  			unuse_pack(&w_curs);
>  			return;
> +		} else if(base_ref && bitmap_have(base_ref)) {
> +			entry->type = entry->in_pack_type;
> +			entry->delta_size = entry->size;
> +			/*
> +			 * XXX we'll leak this, but it's probably OK
> +			 * since we'll exit immediately after the packing
> +			 * is done
> +			 */
> +			entry->delta = xcalloc(1, sizeof(*entry->delta));
> +			hashcpy(entry->delta->idx.sha1, base_ref);
> +			entry->delta->preferred_base = 1;
> +			unuse_pack(&w_curs);
> +			return;
>  		}

Just reading over this again, the conditional here should obviously be checking "thin" (which needs to become a global, as in your patch).

-Peff
Previous: Jeff KingNext: Ben Maurer
Message 7 of 11 in “[RFC] Making use of bitmaps for thin objects”
  1. [RFC] Making use of bitmaps for thin objectsBen Maurer, Dec 22, 2013
  2. Ben MaurerDec 22, 2013
  3. Jeff KingJan 6, 2014
  4. Junio C HamanoJan 6, 2014
  5. Jeff KingJan 6, 2014
  6. Jeff KingJan 6, 2014
  7. Jeff KingJan 6, 2014
  8. Ben MaurerJan 6, 2014
  9. Jeff KingJan 6, 2014
  10. Ben MaurerJan 6, 2014
  11. Jeff KingJan 7, 2014

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.