提交 74fd0705 编写于 作者: S Stefan Beller 提交者: Junio C Hamano

replace-object.c: remove the_repository from prepare_replace_object

This was missed in 5982da9d (replace-object: allow
prepare_replace_object to handle arbitrary repositories, 2018-04-11)

Technically the code works correctly as the replace_map is the same
size in different repositories, however it is hard to read. So convert
the code to the familiar pattern of dereferencing the pointer that we
assign in the sizeof itself.
Signed-off-by: NStefan Beller <sbeller@google.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 d5873072
......@@ -37,7 +37,7 @@ static void prepare_replace_object(struct repository *r)
return;
r->objects->replace_map =
xmalloc(sizeof(*the_repository->objects->replace_map));
xmalloc(sizeof(*r->objects->replace_map));
oidmap_init(r->objects->replace_map, 0);
for_each_replace_ref(r, register_replace_ref, NULL);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册