summaryrefslogtreecommitdiff
path: root/pack-write.c
diff options
context:
space:
mode:
authorPetr Baudis <pasky@suse.cz>2008-09-22 17:20:21 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-09-22 19:19:14 (GMT)
commit8b4eb6b6cd65042c6ecb4f06f19c1f2441899ed6 (patch)
tree76a103d63b0764825c85e6e3a61f549fa33c52f5 /pack-write.c
parent18309f4c3e00886660f15e18c1aaab2f5bc25715 (diff)
downloadgit-8b4eb6b6cd65042c6ecb4f06f19c1f2441899ed6.zip
git-8b4eb6b6cd65042c6ecb4f06f19c1f2441899ed6.tar.gz
git-8b4eb6b6cd65042c6ecb4f06f19c1f2441899ed6.tar.bz2
Do not perform cross-directory renames when creating packs
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>
Diffstat (limited to 'pack-write.c')
-rw-r--r--pack-write.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pack-write.c b/pack-write.c
index 939ed56..3621f1d 100644
--- a/pack-write.c
+++ b/pack-write.c
@@ -45,7 +45,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/tmp_idx_XXXXXX", get_object_directory());
+ "%s/pack/tmp_idx_XXXXXX", get_object_directory());
fd = xmkstemp(tmpfile);
index_name = xstrdup(tmpfile);
} else {