[RFC PATCH 0/2] Utility functions for duplicated pack(write) code
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- May 19, 2022, 11:42 UTC
- Message-ID
- <RFC-cover-0.2-00000000000-20220519T113538Z-avarab@gmail.com>
- In-Reply-To
- <cover.1652915424.git.me@ttaylorr.com>
Minor cleanups thath would semantically & textually conflict with Taylor's https://lore.kernel.org/git/cover.1652915424.git.me@ttaylorr.com/; but which I noted while reading through it.
The 2/2 here is something I wrote before spotting https://lore.kernel.org/git/1d775f9850f00b0c3d1e9133669a6365c8d7bbba.1652915424.git.me@ttaylorr.com/; which does pretty much the same thing. but IMO it's better to put this in hash.h than chunk-format.h.
The 1/2 then fixes the minor NEEDSWORK in that series: https://lore.kernel.org/git/8f9fd21be9fcdda5c73d800fc66d1087d61a6888.1652915424.git.me@ttaylorr.com/
All of this can be ignored for now, I can submit it after cruft packs land (if I remember), or if Taylor's interested in picking it up in some way...
But I figured it was useful to send it along in liue of "maybe do it this way" (2/2) or "can we just create a utility function for this?" (1/2) comments on the series itself.
Ævar Arnfjörð Bjarmason (2): packfile API: add and use a pack_name_to_ext() utility function hash API: add and use a hash_short_id_by_algo() function
commit-graph.c | 18 +++--------------- hash.h | 26 ++++++++++++++++++++++++-- midx.c | 18 +++--------------- pack-bitmap.c | 6 +----- pack-revindex.c | 5 +---- pack-write.c | 12 +----------- packfile.c | 14 ++++++++++---- packfile.h | 9 +++++++++ 8 files changed, 52 insertions(+), 56 deletions(-)
-- 2.36.1.952.g6652f7f0e6b