templates / branches--on commit read-cache: don't write index twice if we can't write shared index (ef5b3a6)
   1: this is just to ensure the directory exists.