]> git.ipfire.org Git - thirdparty/git.git/commit
packfile: warn people away from parse_packed_git()
authorJeff King <peff@peff.net>
Fri, 25 Oct 2024 07:02:22 +0000 (03:02 -0400)
committerTaylor Blau <me@ttaylorr.com>
Fri, 25 Oct 2024 21:35:46 +0000 (17:35 -0400)
commit6b2fc22050227e102af692af28c98925c18c6cc1
tree3dd844bc85f8913f8cf870af9d4fb0ce46db9f8a
parent4390fea963b284a3cc904ffc6c48d4ab02ea5e68
packfile: warn people away from parse_packed_git()

With a name like parse_packed_git(), you might think it's the right way
to access a local pack index and its associated objects. But not so!
It's a one-off used by the dumb-http code to access pack idx files we've
downloaded from the remote, but whose packs we might not have.

There's only one caller left for this function, and ideally we'd drop it
completely and just inline it there. But that would require exposing
other internals from packfile.[ch], like alloc_packed_git() and
check_packed_git_idx().

So let's leave it be for now, and just warn people that it's probably
not what they're looking for. Perhaps in the long run if we eventually
drop dumb-http support, we can remove the function entirely then.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
packfile.h