templates / branches--on commit commit_packed_refs(): use a staging file separate from the lockfile (42dfa7e)
   1: this is just to ensure the directory exists.