diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-02-25 14:48:30 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-02-25 14:50:05 -0800 |
commit | bb0cebd7d0ac9bf2ddf94fe5579603819c4a1fc7 (patch) | |
tree | 1fdfa7e92aa0290bacfb64d77aad894d9915785a /builtin-pack-objects.c | |
parent | 69707d616fd3acda6ecc47198edeaaa87f2cfcea (diff) | |
parent | 6e180cdcecbb3e828aa892925d7ef67abf81ad80 (diff) | |
download | git-bb0cebd7d0ac9bf2ddf94fe5579603819c4a1fc7.tar.gz git-bb0cebd7d0ac9bf2ddf94fe5579603819c4a1fc7.tar.xz |
Merge branch 'jc/maint-1.6.0-pack-directory'
* jc/maint-1.6.0-pack-directory:
Make sure objects/pack exists before creating a new pack
Diffstat (limited to 'builtin-pack-objects.c')
-rw-r--r-- | builtin-pack-objects.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c index cb51916fe..bcefa52c6 100644 --- a/builtin-pack-objects.c +++ b/builtin-pack-objects.c @@ -488,9 +488,8 @@ static void write_pack_file(void) } else { char tmpname[PATH_MAX]; int fd; - snprintf(tmpname, sizeof(tmpname), - "%s/pack/tmp_pack_XXXXXX", get_object_directory()); - fd = xmkstemp(tmpname); + fd = odb_mkstemp(tmpname, sizeof(tmpname), + "pack/tmp_pack_XXXXXX"); pack_tmp_name = xstrdup(tmpname); f = sha1fd(fd, pack_tmp_name); } |