commit.c: allow set_commit_buffer to handle arbitrary repositories
Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
65ea9d4bec
commit
1a40fc4509
4
commit.c
4
commit.c
@ -275,10 +275,10 @@ void free_commit_buffer_slab(struct buffer_slab *bs)
|
||||
free(bs);
|
||||
}
|
||||
|
||||
void set_commit_buffer_the_repository(struct commit *commit, void *buffer, unsigned long size)
|
||||
void set_commit_buffer(struct repository *r, struct commit *commit, void *buffer, unsigned long size)
|
||||
{
|
||||
struct commit_buffer *v = buffer_slab_at(
|
||||
the_repository->parsed_objects->buffer_slab, commit);
|
||||
r->parsed_objects->buffer_slab, commit);
|
||||
v->buffer = buffer;
|
||||
v->size = size;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user