ISP programming and ports 10-13

I had a look on the chematic of arduino and noticed that some of the ISP header pins are connected to port 10-13.
Example: If I use port 10 as an input, will a simple diode work protecting the input sensor while ATMega is programed over ISP?

I'm not sure if the sensor is still alive when its output port is jumping to 5V during an update..