2525#define NO_PREFERRED_PACK (~((uint32_t)0))
2626
2727extern int midx_checksum_valid (struct multi_pack_index * m );
28- extern void clear_midx_files_ext (struct odb_source * source , const char * ext ,
28+ extern void clear_midx_files_ext (struct odb_source_packed * source , const char * ext ,
2929 const char * keep_hash );
30- extern void clear_incremental_midx_files_ext (struct odb_source * source ,
30+ extern void clear_incremental_midx_files_ext (struct odb_source_packed * source ,
3131 const char * ext ,
3232 const struct strvec * keep_hashes );
3333extern int cmp_idx_or_pack_name (const char * idx_or_pack_name ,
@@ -119,7 +119,7 @@ struct write_midx_context {
119119 struct string_list * to_include ;
120120
121121 struct repository * repo ;
122- struct odb_source * source ;
122+ struct odb_source_packed * source ;
123123};
124124
125125static uint32_t midx_pack_perm (struct write_midx_context * ctx ,
@@ -1107,7 +1107,7 @@ static int link_midx_to_chain(struct multi_pack_index *m)
11071107 return ret ;
11081108}
11091109
1110- static void clear_midx_files (struct odb_source * source ,
1110+ static void clear_midx_files (struct odb_source_packed * source ,
11111111 const struct strvec * hashes , unsigned incremental )
11121112{
11131113 /*
@@ -1237,7 +1237,7 @@ static int midx_hashcmp(const struct multi_pack_index *a,
12371237}
12381238
12391239struct write_midx_opts {
1240- struct odb_source * source ; /* non-optional */
1240+ struct odb_source_packed * source ; /* non-optional */
12411241
12421242 struct string_list * packs_to_include ;
12431243 struct string_list * packs_to_drop ;
@@ -1253,7 +1253,7 @@ struct write_midx_opts {
12531253
12541254static int write_midx_internal (struct write_midx_opts * opts )
12551255{
1256- struct repository * r = opts -> source -> odb -> repo ;
1256+ struct repository * r = opts -> source -> base . odb -> repo ;
12571257 struct strbuf midx_name = STRBUF_INIT ;
12581258 unsigned char midx_hash [GIT_MAX_RAWSZ ];
12591259 uint32_t start_pack ;
@@ -1301,7 +1301,7 @@ static int write_midx_internal(struct write_midx_opts *opts)
13011301 if (ctx .incremental )
13021302 strbuf_addf (& midx_name ,
13031303 "%s/pack/multi-pack-index.d/tmp_midx_XXXXXX" ,
1304- opts -> source -> path );
1304+ opts -> source -> base . path );
13051305 else
13061306 get_midx_filename (opts -> source , & midx_name );
13071307 if (safe_create_leading_directories (r , midx_name .buf ))
@@ -1396,7 +1396,7 @@ static int write_midx_internal(struct write_midx_opts *opts)
13961396 fill_packs_from_midx_range (& ctx , bitmap_order );
13971397 } else {
13981398 ctx .to_include = opts -> packs_to_include ;
1399- for_each_file_in_pack_dir (opts -> source -> path , add_pack_to_midx , & ctx );
1399+ for_each_file_in_pack_dir (opts -> source -> base . path , add_pack_to_midx , & ctx );
14001400 }
14011401 stop_progress (& ctx .progress );
14021402
@@ -1847,7 +1847,7 @@ static int write_midx_internal(struct write_midx_opts *opts)
18471847 return result ;
18481848}
18491849
1850- int write_midx_file (struct odb_source * source ,
1850+ int write_midx_file (struct odb_source_packed * source ,
18511851 const char * preferred_pack_name ,
18521852 const char * refs_snapshot ,
18531853 unsigned flags )
@@ -1862,7 +1862,7 @@ int write_midx_file(struct odb_source *source,
18621862 return write_midx_internal (& opts );
18631863}
18641864
1865- int write_midx_file_only (struct odb_source * source ,
1865+ int write_midx_file_only (struct odb_source_packed * source ,
18661866 struct string_list * packs_to_include ,
18671867 const char * preferred_pack_name ,
18681868 const char * refs_snapshot ,
@@ -1881,7 +1881,7 @@ int write_midx_file_only(struct odb_source *source,
18811881 return write_midx_internal (& opts );
18821882}
18831883
1884- int write_midx_file_compact (struct odb_source * source ,
1884+ int write_midx_file_compact (struct odb_source_packed * source ,
18851885 struct multi_pack_index * from ,
18861886 struct multi_pack_index * to ,
18871887 const char * incremental_base ,
@@ -1898,7 +1898,7 @@ int write_midx_file_compact(struct odb_source *source,
18981898 return write_midx_internal (& opts );
18991899}
19001900
1901- int expire_midx_packs (struct odb_source * source , unsigned flags )
1901+ int expire_midx_packs (struct odb_source_packed * source , unsigned flags )
19021902{
19031903 uint32_t i , * count , result = 0 ;
19041904 struct string_list packs_to_drop = STRING_LIST_INIT_DUP ;
@@ -1915,7 +1915,7 @@ int expire_midx_packs(struct odb_source *source, unsigned flags)
19151915
19161916 if (flags & MIDX_PROGRESS )
19171917 progress = start_delayed_progress (
1918- source -> odb -> repo ,
1918+ source -> base . odb -> repo ,
19191919 _ ("Counting referenced objects" ),
19201920 m -> num_objects );
19211921 for (i = 0 ; i < m -> num_objects ; i ++ ) {
@@ -1927,7 +1927,7 @@ int expire_midx_packs(struct odb_source *source, unsigned flags)
19271927
19281928 if (flags & MIDX_PROGRESS )
19291929 progress = start_delayed_progress (
1930- source -> odb -> repo ,
1930+ source -> base . odb -> repo ,
19311931 _ ("Finding and deleting unreferenced packfiles" ),
19321932 m -> num_packs );
19331933 for (i = 0 ; i < m -> num_packs ; i ++ ) {
@@ -2085,9 +2085,9 @@ static void fill_included_packs_batch(struct repository *r,
20852085 free (pack_info );
20862086}
20872087
2088- int midx_repack (struct odb_source * source , size_t batch_size , unsigned flags )
2088+ int midx_repack (struct odb_source_packed * source , size_t batch_size , unsigned flags )
20892089{
2090- struct repository * r = source -> odb -> repo ;
2090+ struct repository * r = source -> base . odb -> repo ;
20912091 int result = 0 ;
20922092 uint32_t i , packs_to_repack = 0 ;
20932093 unsigned char * include_pack ;
@@ -2131,7 +2131,7 @@ int midx_repack(struct odb_source *source, size_t batch_size, unsigned flags)
21312131
21322132 strvec_push (& cmd .args , "pack-objects" );
21332133
2134- strvec_pushf (& cmd .args , "%s/pack/pack" , source -> path );
2134+ strvec_pushf (& cmd .args , "%s/pack/pack" , source -> base . path );
21352135
21362136 if (delta_base_offset )
21372137 strvec_push (& cmd .args , "--delta-base-offset" );
0 commit comments