{"thread":{"id":"48485","subject":"[PATCH RFC 0/1] ref-filter: start using oid_object_info","startedAt":"2018-05-14T10:00:44Z","lastAt":"2018-05-14T10:00:44Z","messageCount":1,"participants":["Оля Тележная"],"isPatch":true,"patchVersion":1,"patchTotal":1},"messages":[{"id":"347577","messageId":"CAL21Bm=6Z54-zsUq0DJqmqhSciHCDLUNXR8inDMAd-b-=QJjcA@mail.gmail.com","threadId":"48485","inReplyTo":null,"subject":"[PATCH RFC 0/1] ref-filter: start using oid_object_info","fromName":"Оля Тележная","fromEmail":"olyatelezhnaya@gmail.com","sentAt":"2018-05-14T10:00:39Z","receivedAt":"2018-05-14T10:00:44Z","isPatch":true,"sender":{"key":"olyatelezhnaya@gmail.com","avatar":"https://avatars.githubusercontent.com/u/11246099?v=4"},"body":"Hello everyone,\nSome context at first: I am trying to migrate cat-file formatting part\n(I mean batch option) from its own implementation to ref-filter one.\nThat's why I want to use oid_object_info_extended() in ref-filter, it\nwill simplify my further work. Additionally, it will give us 2 new\noptions (objectsize:disk and deltabase), and hopefully some commands\ncould work faster because we will not get and parse whole object if we\ndon't need it (invocation of oid_object_info_extended() is cheaper).\n\nI am not sure if I need to add same logic for refs (I mean when we\nneed to deref the object) - please share your opinion.\n\nI also see the problem with sorting - that's the part of logic that I\nam trying not to touch at all. Data (from oid_object_info_extended())\nis initialized in format_ref_array_item(), and we use it later in\npopulate value(). We have get_ref_atom_value(), it uses\npopulate_value(). The problem is that get_ref_atom_value() is used not\nonly by format_ref_array_item(), but also by cmp_ref_sorting(). So, it\nmeans that data could be uninitialized in populate_value(). Now I do\nnothing with it, and it works fine because cmp_ref_sorting() works\nonly with refs, and my code do not change refs logic for now. But it's\nbad, and I know about it.\n\nI see 2 ways of fixing that: I need to support refs somehow; or, I\nneed to add additional checks whether the data is initialized before.\nI will be happy to hear your opinion.\n\nIf you see other issues/ideas - please share your opinion, I\nappreciate it so much.\n\nThanks a lot!\nOlga\n"}]}