git rev-list: fix invalid typecast
git rev-list passes rev_list_info, not rev_list objects. Without this fix, rev-list enables or disables the --verify-objects option depending on a read from an undefined memory location. Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
d0482e88a7
commit
cb8da70547
@ -180,10 +180,10 @@ static void show_object(struct object *obj,
|
||||
const struct name_path *path, const char *component,
|
||||
void *cb_data)
|
||||
{
|
||||
struct rev_info *info = cb_data;
|
||||
struct rev_list_info *info = cb_data;
|
||||
|
||||
finish_object(obj, path, component, cb_data);
|
||||
if (info->verify_objects && !obj->parsed && obj->type != OBJ_COMMIT)
|
||||
if (info->revs->verify_objects && !obj->parsed && obj->type != OBJ_COMMIT)
|
||||
parse_object(obj->sha1);
|
||||
show_object_with_name(stdout, obj, path, component);
|
||||
}
|
||||
|
Reference in New Issue
Block a user