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

Re: [PATCH 02/13] oidset2: create oidset subclass with object length and pathname

From
JTJonathan Tan <jonathantanmy@google.com>
Date
Sep 26, 2017, 22:20 UTC
Message-ID
<20170926152022.67d3d6bcc93d862aa1066207@google.com>
In-Reply-To
<20170922202632.53714-3-git@jeffhostetler.com>

On Fri, 22 Sep 2017 20:26:21 +0000 Jeff Hostetler <git@jeffhostetler.com> wrote:

Show 9 quoted lines
> From: Jeff Hostetler <jeffhost@microsoft.com>
> 
> Create subclass of oidset where each entry has a
> field to store the length of the object's content
> and an optional pathname.
> 
> This will be used in a future commit to build a
> manifest of omitted objects in a partial/narrow
> clone/fetch.

As Brandon mentioned, I think "oidmap" should be the new data structure of choice (with "oidset" modified to use it).

Show 8 quoted lines
> +struct oidset2_entry {
> +	struct hashmap_entry hash;
> +	struct object_id oid;
> +
> +	enum object_type type;
> +	int64_t object_length;	/* This is SIGNED. Use -1 when unknown. */
> +	char *pathname;
> +};

object_length is defined to be "unsigned long" in Git code, I think. When is object_length not known, and in those cases, would it be better to use a separate data structure to store what we need?

Previous: Brandon WilliamsNext: Jeff Hostetler
Message 5 of 16 in “RFC object filtering for parital clone”
  1. 00/13 RFC object filtering for parital cloneJeff Hostetler, Sep 22, 2017
  2. 01/13 dir: refactor add_excludes()Jeff Hostetler, Sep 22, 2017
  3. 02/13 oidset2: create oidset subclass with object length and pathnameJeff Hostetler, Sep 22, 2017
  4. Brandon WilliamsSep 22, 2017
  5. Jonathan TanSep 26, 2017
  6. Jeff HostetlerSep 27, 2017
  7. 03/13 list-objects: filter objects in traverse_commit_listJeff Hostetler, Sep 22, 2017
  8. Jonathan TanSep 26, 2017
  9. Jeff HostetlerSep 27, 2017
  10. Jonathan TanSep 27, 2017
  11. Jeff HostetlerSep 27, 2017
  12. Jonathan TanSep 27, 2017
  13. 04/13 list-objects-filter-all: add filter to omit all blobsJeff Hostetler, Sep 22, 2017
  14. Jonathan TanSep 23, 2017
  15. Jeff HostetlerSep 26, 2017
  16. Jeff HostetlerSep 26, 2017

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.