Skip to content

Commit 5766524

Browse files
derrickstoleegitster
authored andcommitted
pack-bitmap-write: use const for hashes
The next change will use a const array when calling this method. There is no need for the non-const version, so let's do this cleanup quickly. Signed-off-by: Derrick Stolee <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent bbea4dc commit 5766524

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pack-bitmap-write.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ static void write_hash_cache(struct hashfile *f,
683683
}
684684
}
685685

686-
void bitmap_writer_set_checksum(unsigned char *sha1)
686+
void bitmap_writer_set_checksum(const unsigned char *sha1)
687687
{
688688
hashcpy(writer.pack_checksum, sha1);
689689
}

pack-bitmap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ int bitmap_has_oid_in_uninteresting(struct bitmap_index *, const struct object_i
7575
off_t get_disk_usage_from_bitmap(struct bitmap_index *, struct rev_info *);
7676

7777
void bitmap_writer_show_progress(int show);
78-
void bitmap_writer_set_checksum(unsigned char *sha1);
78+
void bitmap_writer_set_checksum(const unsigned char *sha1);
7979
void bitmap_writer_build_type_index(struct packing_data *to_pack,
8080
struct pack_idx_entry **index,
8181
uint32_t index_nr);

0 commit comments

Comments
 (0)