pack-bitmap: drop repository argument from prepare_midx_bitmap_git()
We never look at the repository argument which is passed. This makes sense, since the multi_pack_index struct already tells us everything we need to access the files in its associated object directory. Signed-off-by: Jeff King <peff@peff.net> Reviewed-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
							parent
							
								
									2d59597333
								
							
						
					
					
						commit
						bfbb60d328
					
				
							
								
								
									
										2
									
								
								midx.c
								
								
								
								
							
							
						
						
									
										2
									
								
								midx.c
								
								
								
								
							|  | @ -1144,7 +1144,7 @@ static int write_midx_internal(const char *object_dir, | ||||||
| 		int bitmap_exists; | 		int bitmap_exists; | ||||||
| 		int want_bitmap = flags & MIDX_WRITE_BITMAP; | 		int want_bitmap = flags & MIDX_WRITE_BITMAP; | ||||||
|  |  | ||||||
| 		bitmap_git = prepare_midx_bitmap_git(the_repository, ctx.m); | 		bitmap_git = prepare_midx_bitmap_git(ctx.m); | ||||||
| 		bitmap_exists = bitmap_git && bitmap_is_midx(bitmap_git); | 		bitmap_exists = bitmap_git && bitmap_is_midx(bitmap_git); | ||||||
| 		free_bitmap_index(bitmap_git); | 		free_bitmap_index(bitmap_git); | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @ -517,8 +517,7 @@ struct bitmap_index *prepare_bitmap_git(struct repository *r) | ||||||
| 	return NULL; | 	return NULL; | ||||||
| } | } | ||||||
|  |  | ||||||
| struct bitmap_index *prepare_midx_bitmap_git(struct repository *r, | struct bitmap_index *prepare_midx_bitmap_git(struct multi_pack_index *midx) | ||||||
| 					     struct multi_pack_index *midx) |  | ||||||
| { | { | ||||||
| 	struct bitmap_index *bitmap_git = xcalloc(1, sizeof(*bitmap_git)); | 	struct bitmap_index *bitmap_git = xcalloc(1, sizeof(*bitmap_git)); | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @ -44,8 +44,7 @@ typedef int (*show_reachable_fn)( | ||||||
| struct bitmap_index; | struct bitmap_index; | ||||||
|  |  | ||||||
| struct bitmap_index *prepare_bitmap_git(struct repository *r); | struct bitmap_index *prepare_bitmap_git(struct repository *r); | ||||||
| struct bitmap_index *prepare_midx_bitmap_git(struct repository *r, | struct bitmap_index *prepare_midx_bitmap_git(struct multi_pack_index *midx); | ||||||
| 					     struct multi_pack_index *midx); |  | ||||||
| void count_bitmap_commit_list(struct bitmap_index *, uint32_t *commits, | void count_bitmap_commit_list(struct bitmap_index *, uint32_t *commits, | ||||||
| 			      uint32_t *trees, uint32_t *blobs, uint32_t *tags); | 			      uint32_t *trees, uint32_t *blobs, uint32_t *tags); | ||||||
| void traverse_bitmap_commit_list(struct bitmap_index *, | void traverse_bitmap_commit_list(struct bitmap_index *, | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 Jeff King
						Jeff King