We construct the deformation functor associated with a pair of morphisms of differential graded Lie algebras, and use it to study infinitesimal deformations of holomorphic maps of compact complex manifolds. In particular, using L-infinity structures, we give an explicit description of the differential graded Lie algebra that controls this problem.