Re: [PATCH v5 18/18] tree-entry.h API: rename tree_entry_extract() to tree_entry_extract_mode()
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 1, 2021, 20:49 UTC
- Message-ID
- <xmqqr1jt20i7.fsf@gitster.g>
- In-Reply-To
- <patch-18.19-e961a0e8b5b-20210331T190531Z-avarab@gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
> As with the recent split of the get_tree_entry() function, rename the > tree_entry_extract() function to *_mode() in preparation for adding > other variants of it.
I do not see a value in this approach over optionally accepting NULL, for the same reason why splitting get_tree_entry() does not show a value over optionally accepting NULL. At least at this point in the series.
There might be future changes that would benefit from having separate functions, but I do not see how they cannot work with an updated version of existing helper functions that optionally can take NULL as "don't care" when they can with a different function with one fewer parameter.