patch-ids.c: use ALLOC_GROW() in add_commit()