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

[PATCH RFC 0/1] ref-filter: start using oid_object_info

From
Оля Тележная <olyatelezhnaya@gmail.com>
Date
May 14, 2018, 10:00 UTC
Message-ID
<CAL21Bm=6Z54-zsUq0DJqmqhSciHCDLUNXR8inDMAd-b-=QJjcA@mail.gmail.com>

Hello everyone, Some context at first: I am trying to migrate cat-file formatting part (I mean batch option) from its own implementation to ref-filter one. That's why I want to use oid_object_info_extended() in ref-filter, it will simplify my further work. Additionally, it will give us 2 new options (objectsize:disk and deltabase), and hopefully some commands could work faster because we will not get and parse whole object if we don't need it (invocation of oid_object_info_extended() is cheaper).

I am not sure if I need to add same logic for refs (I mean when we need to deref the object) - please share your opinion.

I also see the problem with sorting - that's the part of logic that I am trying not to touch at all. Data (from oid_object_info_extended()) is initialized in format_ref_array_item(), and we use it later in populate value(). We have get_ref_atom_value(), it uses populate_value(). The problem is that get_ref_atom_value() is used not only by format_ref_array_item(), but also by cmp_ref_sorting(). So, it means that data could be uninitialized in populate_value(). Now I do nothing with it, and it works fine because cmp_ref_sorting() works only with refs, and my code do not change refs logic for now. But it's bad, and I know about it.

I see 2 ways of fixing that: I need to support refs somehow; or, I need to add additional checks whether the data is initialized before. I will be happy to hear your opinion.

If you see other issues/ideas - please share your opinion, I appreciate it so much.

Thanks a lot! Olga

Message 1 of 1 in “ref-filter: start using oid_object_info”
  1. 0/1 ref-filter: start using oid_object_infoОля Тележная, May 14, 2018

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.