Renewably sourced hydrogen is seen as promising sustainable carbon-free alternative to conventional fossil fuels for use in hard to decarbonize sectors. As the hydrogen supply builds up, dual-fuel hydrogen-diesel engines have a particular advantage of fuel flexibility as they can operate only on diesel fuel in case of supply shortages, in addition to the simplicity of engine modification. The dual-fuel compression ignition strategy initiates combustion of hydrogen using short pilot-injections of diesel fuel into the combustion chamber. In the context of such engine combustion process, the impact of hydrogen addition on the ignition and combustion behavior of a pilot diesel-spray is investigated in a heavy-duty, single-cylinder, optical engine. To this end, the spatial and temporal evolution of two-stage autoignition of a diesel-fuel surrogate, n-heptane, injected into a premixed charge of hydrogen and air is studied using optical diagnostics. This includes high-speed cool-flame and OH* chemiluminescence imaging which serve as an indicator of low-temperature and high-temperature heat-release, respectively. A comparative analysis of the ignition inhibitive properties of hydrogen benchmarked against natural gas dual-fuel combustion from a previous study under nominally identical conditions facilitates the understanding of the underlying mechanisms driving the ignition behavior. The experimental results are complemented with zero-dimensional chemical-kinetics simulations to provide further insight on the impact of hydrogen and natural gas addition on the two-stage autoignition chemistry of diesel fuel. The imaging results and the thermodynamic analysis revealed a complex interplay of physico-chemical process including jet entrainment, end of injection enhanced mixing, and low and high-temperature fuel-chemistry in the presence of hydrogen, which jointly govern the ignition process in a dual-fuel engine.