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

Re: [WIP 1/2] pack-objects: rename want_.* to ignore_.*

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 2, 2017, 03:45 UTC
Message-ID
<xmqqwp8vyrv1.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<5e8aebf2726481ef63838291c32e07439289d922.1496361873.git.jonathantanmy@google.com>
Jonathan Tan <jonathantanmy@google.com> writes:
> Currently, pack-objects conflates the concepts of "ignoring an object"
> and "including it in to_pack".

Hmph, that statement is a hard to read and agree to. I thought an ignored object that is not going to be packed is one that won't hit to_pack?

I agree that "including to to_pack" and "actually appearing in the resulting pack" are three different things, though. Preferred base objects that are used when constructing a thin pack are thrown into to_pack because they need to participate in the delta base selection computation, but by definition they shouldn't be contained in the resulting pack (hence, nr_result is not incremented for them).

Show 6 quoted lines
> This is fine for now, but a subsequent
> commit will introduce the concept of an object that cannot be completely
> ignored, but should not be included in to_pack either. To separate these
> concepts, restrict want_found_object() and want_object_in_pack() to only
> indicate if the object is to be ignored. This is done by renaming these
> methods and swapping the meanings of the return values 0 and 1.

I am a bit confused by your reasoning. I guess it will become clearer if I knew exactly what you mean by "ignoring". It is not like "pretend as if it didn't exist in the rev-list --objects output we are working off of".

Show 5 quoted lines
> We also take the opportunity to use the terminology "preferred_base"
> instead of "excluded" in these methods. It is true that preferred bases
> are not included in the final packfile generation, but at this point in
> the code, there is no exclusion taking place - on the contrary, if
> something is "excluded", it is in fact guaranteed to be in to_pack.
This one I can understand.
> Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
> ---
>  builtin/pack-objects.c | 50 +++++++++++++++++++++++++-------------------------
>  1 file changed, 25 insertions(+), 25 deletions(-)

Without understanding why this change is desirable, I can tell that overall this does not change the behaviour, which is good ;-).

Previous: Jonathan TanNext: Jonathan Tan
Message 3 of 17 in “[WIP 0/2] Modifying pack-objects to support --blob-size-limit”
  1. Jonathan TanJun 2, 2017
  2. 1/2 pack-objects: rename want_.* to ignore_.*Jonathan Tan, Jun 2, 2017
  3. Junio C HamanoJun 2, 2017
  4. 2/2 pack-objects: support --blob-size-limitJonathan Tan, Jun 2, 2017
  5. Junio C HamanoJun 2, 2017
  6. 0/2 Modifying pack objects to support --blob-max-bytesJonathan Tan, Jun 2, 2017
  7. 1/2 pack-objects: rename want_.* to ignore_.*Jonathan Tan, Jun 2, 2017
  8. 2/2 pack-objects: support --blob-max-bytesJonathan Tan, Jun 2, 2017
  9. Jeff KingJun 2, 2017
  10. Jonathan NiederJun 2, 2017
  11. Jeff KingJun 7, 2017
  12. Junio C HamanoJun 3, 2017
  13. Jeff HostetlerJun 15, 2017
  14. Jonathan TanJun 15, 2017
  15. Jeff KingJun 2, 2017
  16. Jonathan TanJun 5, 2017
  17. Jeff KingJun 7, 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.