From: Jeff Hostetler <git@jeffhostetler.com>
To: Jonathan Tan <jonathantanmy@google.com>
Cc: git@vger.kernel.org, gitster@pobox.com, peff@peff.net,
jeffhost@microsoft.com
Subject: Re: [PATCH 02/13] oidset2: create oidset subclass with object length and pathname
Date: Wed, 27 Sep 2017 10:47:13 -0400 [thread overview]
Message-ID: <5f028dc4-ce57-d628-19a3-006df7aa5bea@jeffhostetler.com> (raw)
In-Reply-To: <20170926152022.67d3d6bcc93d862aa1066207@google.com>
On 9/26/2017 6:20 PM, Jonathan Tan wrote:
> On Fri, 22 Sep 2017 20:26:21 +0000
> Jeff Hostetler <git@jeffhostetler.com> wrote:
>
>> 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).
I'll take a look at that. I'm not exactly happy with
my oidset2, but it works and it minimized touching other
things. But yes, it may clear up a few things.
>> +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?
Yeah, I struggled with that one. Git currently treats file size as
a 32-bit unsigned value throughout the code. I assume eventually there
will be a round of changes to support 64-bit values, so this anticipates
that.
I could change it to be an unknown flag, rather assuming -1, but in an
earlier draft I was printing -1 in the rev-list output. I can change this.
WRT a separate structure, the SET I create will contain entries for items
where we may or may not know the size and that depends on the context.
When building a list of already-missing blobs (with the --filter-print-missing)
we never know the size. But when building a list of to-be-omitted blobs
(from the current set of filter options), we may or may not know. I'm
not sure we need 2 _entry definitions right now.
next prev parent reply other threads:[~2017-09-27 14:47 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-22 20:26 [PATCH 00/13] RFC object filtering for parital clone Jeff Hostetler
2017-09-22 20:26 ` [PATCH 01/13] dir: refactor add_excludes() Jeff Hostetler
2017-09-22 20:26 ` [PATCH 02/13] oidset2: create oidset subclass with object length and pathname Jeff Hostetler
2017-09-22 20:42 ` Brandon Williams
2017-09-26 22:20 ` Jonathan Tan
2017-09-27 14:47 ` Jeff Hostetler [this message]
2017-09-22 20:26 ` [PATCH 03/13] list-objects: filter objects in traverse_commit_list Jeff Hostetler
2017-09-26 22:31 ` Jonathan Tan
2017-09-27 17:04 ` Jeff Hostetler
2017-09-27 18:00 ` Jonathan Tan
2017-09-27 19:09 ` Jeff Hostetler
2017-09-27 20:49 ` Jonathan Tan
2017-09-22 20:26 ` [PATCH 04/13] list-objects-filter-all: add filter to omit all blobs Jeff Hostetler
2017-09-23 0:39 ` [PATCH 00/13] RFC object filtering for parital clone Jonathan Tan
2017-09-26 14:55 ` Jeff Hostetler
2017-09-26 19:23 ` Jeff Hostetler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5f028dc4-ce57-d628-19a3-006df7aa5bea@jeffhostetler.com \
--to=git@jeffhostetler.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jeffhost@microsoft.com \
--cc=jonathantanmy@google.com \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).