diff options
author | Kyle Zhao <kylezhao@tencent.com> | 2021-09-15 09:09:23 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-09-15 22:16:25 -0700 |
commit | afb32e81019c47e933368f126be3d6af657a2060 (patch) | |
tree | e6162a7a5244309a1ef389eaf14a70940b827023 /pack-revindex.h | |
parent | e6b971fcf5d85db821636f2d887cfaf204b32bda (diff) | |
download | git-afb32e81019c47e933368f126be3d6af657a2060.tar.gz |
pack-revindex.h: correct the time complexity descriptions
Time complexities for pack_pos_to_midx and midx_to_pack_pos are swapped,
correct it.
Signed-off-by: Kyle Zhao <kylezhao@tencent.com>
Reviewed-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pack-revindex.h')
-rw-r--r-- | pack-revindex.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pack-revindex.h b/pack-revindex.h index 479b8f2f9c..74f4eae668 100644 --- a/pack-revindex.h +++ b/pack-revindex.h @@ -109,7 +109,7 @@ off_t pack_pos_to_offset(struct packed_git *p, uint32_t pos); * If the reverse index has not yet been loaded, or the position is out of * bounds, this function aborts. * - * This function runs in time O(log N) with the number of objects in the MIDX. + * This function runs in constant time. */ uint32_t pack_pos_to_midx(struct multi_pack_index *m, uint32_t pos); @@ -120,7 +120,7 @@ uint32_t pack_pos_to_midx(struct multi_pack_index *m, uint32_t pos); * If the reverse index has not yet been loaded, or the position is out of * bounds, this function aborts. * - * This function runs in constant time. + * This function runs in time O(log N) with the number of objects in the MIDX. */ int midx_to_pack_pos(struct multi_pack_index *midx, uint32_t at, uint32_t *pos); |