X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=pack-write.c;fp=pack-write.c;h=e82c02545794fd10d2a81863676005e14069ce21;hb=6e180cdcecbb3e828aa892925d7ef67abf81ad80;hp=3621f1dd3258d9dcd63bf5a6738e5d54940ffbbb;hpb=718258e256b74622aa55f5ee0cb9cff4cce6bf9f;p=git.git diff --git a/pack-write.c b/pack-write.c index 3621f1dd3..e82c02545 100644 --- a/pack-write.c +++ b/pack-write.c @@ -44,9 +44,7 @@ char *write_idx_file(char *index_name, struct pack_idx_entry **objects, if (!index_name) { static char tmpfile[PATH_MAX]; - snprintf(tmpfile, sizeof(tmpfile), - "%s/pack/tmp_idx_XXXXXX", get_object_directory()); - fd = xmkstemp(tmpfile); + fd = odb_mkstemp(tmpfile, sizeof(tmpfile), "pack/tmp_idx_XXXXXX"); index_name = xstrdup(tmpfile); } else { unlink(index_name); @@ -239,7 +237,7 @@ char *index_pack_lockfile(int ip_out) char packname[46]; /* - * The first thing we expects from index-pack's output + * The first thing we expect from index-pack's output * is "pack\t%40s\n" or "keep\t%40s\n" (46 bytes) where * %40s is the newly created pack SHA1 name. In the "keep" * case, we need it to remove the corresponding .keep file