templates / branches--on commit refs: prevent accidental NULL dereference in write_pseudoref (6ee1821)
   1: this is just to ensure the directory exists.