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

Re: [PATCH 02/10] pack-objects: read delta base oid into object_id struct

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Feb 25, 2020, 00:19 UTC
Message-ID
<20200225001924.GJ6462@camp.crustytoothpaste.net>
In-Reply-To
<20200224042944.GB1018190@coredump.intra.peff.net>
On 2020-02-24 at 04:29:44, Jeff King wrote:
Show 14 quoted lines
> @@ -1707,9 +1702,13 @@ static void check_object(struct object_entry *entry)
>  			unuse_pack(&w_curs);
>  			return;
>  		case OBJ_REF_DELTA:
> -			if (reuse_delta && !entry->preferred_base)
> -				base_ref = use_pack(p, &w_curs,
> -						entry->in_pack_offset + used, NULL);
> +			if (reuse_delta && !entry->preferred_base) {
> +				oidread(&base_ref,
> +					use_pack(p, &w_curs,
> +						 entry->in_pack_offset + used,
> +						 NULL));
> +				have_base = 1;
> +			}

Thanks for using oidread here. That makes my nascent future series that adds an algorithm member to struct object_id much easier.

-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
Previous: Jeff KingNext: Jeff King
Message 5 of 14 in “removing nth_packed_object_sha1()”
  1. 0/10 removing nth_packed_object_sha1()Jeff King, Feb 24, 2020
  2. 01/10 nth_packed_object_oid(): use customary integer returnJeff King, Feb 24, 2020
  3. Jeff KingFeb 24, 2020
  4. 02/10 pack-objects: read delta base oid into object_id structJeff King, Feb 24, 2020
  5. brian m. carlsonFeb 25, 2020
  6. 03/10 pack-objects: convert oe_set_delta_ext() to use object_idJeff King, Feb 24, 2020
  7. 04/10 pack-objects: use object_id struct in pack-reuse codeJeff King, Feb 24, 2020
  8. 05/10 pack-bitmap: use object_id when loading on-disk bitmapsJeff King, Feb 24, 2020
  9. 06/10 pack-check: convert "internal error" die to a BUG()Jeff King, Feb 24, 2020
  10. 07/10 pack-check: push oid lookup into loopJeff King, Feb 24, 2020
  11. 08/10 packed_object_info(): use object_id for returning delta baseJeff King, Feb 24, 2020
  12. 09/10 packed_object_info(): use object_id internally for delta baseJeff King, Feb 24, 2020
  13. 10/10 packfile: drop nth_packed_object_sha1()Jeff King, Feb 24, 2020
  14. brian m. carlsonFeb 25, 2020

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.