| 1989 | } |
| 1990 | |
| 1991 | static int want_included_pack(struct multi_pack_index *m, |
| 1992 | int pack_kept_objects, |
| 1993 | uint32_t pack_int_id) |
| 1994 | { |
| 1995 | struct packed_git *p; |
| 1996 | if (prepare_midx_pack(m, pack_int_id)) |
| 1997 | return 0; |
| 1998 | p = m->packs[pack_int_id]; |
| 1999 | if (!pack_kept_objects && p->pack_keep) |
| 2000 | return 0; |
| 2001 | if (p->is_cruft) |
| 2002 | return 0; |
| 2003 | if (open_pack_index(p) || !p->num_objects) |
| 2004 | return 0; |
| 2005 | return 1; |
| 2006 | } |
| 2007 | |
| 2008 | static void fill_included_packs_all(struct repository *r, |
| 2009 | struct multi_pack_index *m, |
no test coverage detected