summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 18309f4)
raw | patch | inline | side by side (parent: 18309f4)
author | Petr Baudis <pasky@suse.cz> | |
Mon, 22 Sep 2008 17:20:21 +0000 (19:20 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 22 Sep 2008 19:19:14 +0000 (12:19 -0700) |
A comment on top of create_tmpfile() describes caveats ('can have
problems on various systems (FAT, NFS, Coda)') that should apply
in this situation as well. This in the end did not end up solving
any of my personal problems, but it might be a useful cleanup patch
nevertheless.
Signed-off-by: Petr Baudis <pasky@suse.cz>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
problems on various systems (FAT, NFS, Coda)') that should apply
in this situation as well. This in the end did not end up solving
any of my personal problems, but it might be a useful cleanup patch
nevertheless.
Signed-off-by: Petr Baudis <pasky@suse.cz>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-pack-objects.c | patch | blob | history | |
fast-import.c | patch | blob | history | |
index-pack.c | patch | blob | history | |
pack-write.c | patch | blob | history |
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index 217fd49da9ad98e660e6522024793ae3a357e837..4004e73e40db210334fa3ef69b49d07b929f2c99 100644 (file)
--- a/builtin-pack-objects.c
+++ b/builtin-pack-objects.c
char tmpname[PATH_MAX];
int fd;
snprintf(tmpname, sizeof(tmpname),
- "%s/tmp_pack_XXXXXX", get_object_directory());
+ "%s/pack/tmp_pack_XXXXXX", get_object_directory());
fd = xmkstemp(tmpname);
pack_tmp_name = xstrdup(tmpname);
f = sha1fd(fd, pack_tmp_name);
diff --git a/fast-import.c b/fast-import.c
index d85b3a561f511bfa7db0232c43a8088c0df8ae27..5473cd4d626c1260cf1a192ab05cc63c37a8fbcb 100644 (file)
--- a/fast-import.c
+++ b/fast-import.c
int pack_fd;
snprintf(tmpfile, sizeof(tmpfile),
- "%s/tmp_pack_XXXXXX", get_object_directory());
+ "%s/pack/tmp_pack_XXXXXX", get_object_directory());
pack_fd = xmkstemp(tmpfile);
p = xcalloc(1, sizeof(*p) + strlen(tmpfile) + 2);
strcpy(p->pack_name, tmpfile);
}
snprintf(tmpfile, sizeof(tmpfile),
- "%s/tmp_idx_XXXXXX", get_object_directory());
+ "%s/pack/tmp_idx_XXXXXX", get_object_directory());
idx_fd = xmkstemp(tmpfile);
f = sha1fd(idx_fd, tmpfile);
sha1write(f, array, 256 * sizeof(int));
diff --git a/index-pack.c b/index-pack.c
index a6e91fe3ba47e3b0837648180bb7d47acd3e7dc7..530d820370fb2b02a443873b8b9ddd0bcffcb5ec 100644 (file)
--- a/index-pack.c
+++ b/index-pack.c
if (!pack_name) {
static char tmpfile[PATH_MAX];
snprintf(tmpfile, sizeof(tmpfile),
- "%s/tmp_pack_XXXXXX", get_object_directory());
+ "%s/pack/tmp_pack_XXXXXX", get_object_directory());
output_fd = xmkstemp(tmpfile);
pack_name = xstrdup(tmpfile);
} else
diff --git a/pack-write.c b/pack-write.c
index 939ed56362d3c29bfc64e8cca91032df9a57961e..3621f1dd3258d9dcd63bf5a6738e5d54940ffbbb 100644 (file)
--- a/pack-write.c
+++ b/pack-write.c
if (!index_name) {
static char tmpfile[PATH_MAX];
snprintf(tmpfile, sizeof(tmpfile),
- "%s/tmp_idx_XXXXXX", get_object_directory());
+ "%s/pack/tmp_idx_XXXXXX", get_object_directory());
fd = xmkstemp(tmpfile);
index_name = xstrdup(tmpfile);
} else {