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>
Kyle Zhao committed
Sep 15, 2021 at 09:09 UTC
afb32e81019c47e933368f126be3d6af657a2060
1 file changed
+2
-2
pack-revindex.h
+2
-2
@@ -109,7 +109,7 @@ off_t pack_pos_to_offset(struct packed_git *p, uint32_t pos);
109
* If the reverse index has not yet been loaded, or the position is out of
110
* bounds, this function aborts.
111
*
112
- * This function runs in time O(log N) with the number of objects in the MIDX.
112
+ * This function runs in constant time.
113
*/
114
uint32_t pack_pos_to_midx(struct multi_pack_index *m, uint32_t pos);
115
@@ -120,7 +120,7 @@ uint32_t pack_pos_to_midx(struct multi_pack_index *m, uint32_t pos);
120
* If the reverse index has not yet been loaded, or the position is out of
121
* bounds, this function aborts.
122
*
123
- * This function runs in constant time.
123
+ * This function runs in time O(log N) with the number of objects in the MIDX.
124
*/
125
int midx_to_pack_pos(struct multi_pack_index *midx, uint32_t at, uint32_t *pos);
126