git update-index --cacheinfo can be used to select a stage when there are merged and unmerged entries

Signed-off-by: Jaime Soriano Pastor <jsorianopastor@gmail.com>