aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/commit.c
diff options
context:
space:
mode:
authorTaylor Blau <me@ttaylorr.com>2023-12-14 17:23:54 -0500
committerJunio C Hamano <gitster@pobox.com>2023-12-14 14:38:07 -0800
commit307d75bbe6b33267872633173a5d9b5d88b87793 (patch)
tree3b822da039d02e7e22ebd4721a13b0fdc433b24b /builtin/commit.c
parentmidx: implement `BTMP` chunk (diff)
downloadgit-307d75bbe6b33267872633173a5d9b5d88b87793.tar.gz
git-307d75bbe6b33267872633173a5d9b5d88b87793.zip
midx: implement `midx_locate_pack()`
The multi-pack index API exposes a `midx_contains_pack()` function that takes in a string ending in either ".idx" or ".pack" and returns whether or not the MIDX contains a given pack corresponding to that string. There is no corresponding function to locate the position of a pack within the MIDX's pack order (sorted lexically by pack filename). We could add an optional out parameter to `midx_contains_pack()` that is filled out with the pack's position when the parameter is non-NULL. To minimize the amount of fallout from this change, instead introduce a new function by renaming `midx_contains_pack()` to `midx_locate_pack()`, adding that output parameter, and then reimplementing `midx_contains_pack()` in terms of it. Future patches will make use of this new function. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit.c')
0 files changed, 0 insertions, 0 deletions