diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-03-21 22:53:36 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-03-21 22:53:36 -0700 |
commit | 2990034f1ed2c3d85d23d5611a1f04d317f785ac (patch) | |
tree | b279df7a87a679a74c942f1c32d42681f9317f4b /pack-write.c | |
parent | bf0fe35c938ac9f03d1369600b0c76e428a57507 (diff) | |
parent | 2c626e5fa8a46f647b88fb32d7b28d573e8631bf (diff) | |
download | git-2990034f1ed2c3d85d23d5611a1f04d317f785ac.tar.gz |
Merge branch 'jc/maint-1.6.0-pack-directory' into maint-1.6.1
* jc/maint-1.6.0-pack-directory:
Fix odb_mkstemp() on AIX
Make sure objects/pack exists before creating a new pack
Conflicts:
wrapper.c
Diffstat (limited to 'pack-write.c')
-rw-r--r-- | pack-write.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/pack-write.c b/pack-write.c index b426006c58..7053538f4c 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 |