From 8b4eb6b6cd65042c6ecb4f06f19c1f2441899ed6 Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Mon, 22 Sep 2008 19:20:21 +0200 Subject: 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 Acked-by: Linus Torvalds Signed-off-by: Junio C Hamano --- fast-import.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fast-import.c') diff --git a/fast-import.c b/fast-import.c index d85b3a561..5473cd4d6 100644 --- a/fast-import.c +++ b/fast-import.c @@ -816,7 +816,7 @@ static void start_packfile(void) 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); @@ -878,7 +878,7 @@ static char *create_index(void) } 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)); -- cgit v1.2.1