Thread (164 messages) 164 messages, 7 authors, 2021-09-18

Re: [PATCH v2 08/15] midx: allow marking a pack as preferred

From: Taylor Blau <hidden>
Date: 2021-03-04 03:05:33

On Wed, Mar 03, 2021 at 06:00:17PM -0800, Jonathan Tan wrote:
quoted
I
think ultimately you want something like this squashed in:
--- >8 ---

diff --git a/midx.c b/midx.c
index d2c56c4bc6..46f55ff6cf 100644
--- a/midx.c
+++ b/midx.c
@@ -582,7 +582,7 @@ static struct pack_midx_entry *get_sorted_entries(struct multi_pack_index *m,
 						  struct pack_info *info,
 						  uint32_t nr_packs,
 						  uint32_t *nr_objects,
-						  uint32_t preferred_pack)
+						  int preferred_pack)
Why this change?
This was wrong in the original patch: ctx.preferred_pack is an integer,
and is set to -1 when no preferred pack was specified.

It's certainly unlikely that we'd have 2^31 packs, but silently
converting a signed type to an unsigned one is misleading.
The rest makes sense.
Thanks for taking a look.

Taylor
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help