Use hashcpy() when copying object names
[gitweb.git] / pack-write.c
index 605d01b25cbd9d796810f8aa810894a2c198da28..9b8308b7594263c4900a6d75c18b91cea959fd70 100644 (file)
@@ -364,5 +364,7 @@ void finish_tmp_packfile(char *name_buffer,
        if (rename(idx_tmp_name, name_buffer))
                die_errno("unable to rename temporary index file");
 
+       *end_of_name_prefix = '\0';
+
        free((void *)idx_tmp_name);
 }