summaryrefslogtreecommitdiff
path: root/fast-import.c
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2007-03-24 15:58:22 (GMT)
committerJunio C Hamano <junkio@cox.net>2007-03-25 05:32:39 (GMT)
commit0e55181f29ee6599ab6888ac54d186c83d355a70 (patch)
treed237011873162cb78bab4cea1c79b5c11ec7f0d1 /fast-import.c
parent46d409d0bf25b361f812eec4888c46509c203a6d (diff)
downloadgit-0e55181f29ee6599ab6888ac54d186c83d355a70.zip
git-0e55181f29ee6599ab6888ac54d186c83d355a70.tar.gz
git-0e55181f29ee6599ab6888ac54d186c83d355a70.tar.bz2
make it more obvious that temporary files are temporary files
When some operations are interrupted (or "die()'d" or crashed) then the partial object/pack/index file may remain around. Make it more obvious in their name that those files are temporary stuff and can be cleaned up if no operation is in progress. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'fast-import.c')
-rw-r--r--fast-import.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fast-import.c b/fast-import.c
index 55ffae4..bea1215 100644
--- a/fast-import.c
+++ b/fast-import.c
@@ -630,7 +630,7 @@ static void start_packfile(void)
int pack_fd;
snprintf(tmpfile, sizeof(tmpfile),
- "%s/pack_XXXXXX", get_object_directory());
+ "%s/tmp_pack_XXXXXX", get_object_directory());
pack_fd = mkstemp(tmpfile);
if (pack_fd < 0)
die("Can't create %s: %s", tmpfile, strerror(errno));
@@ -730,7 +730,7 @@ static char *create_index(void)
}
snprintf(tmpfile, sizeof(tmpfile),
- "%s/index_XXXXXX", get_object_directory());
+ "%s/tmp_idx_XXXXXX", get_object_directory());
idx_fd = mkstemp(tmpfile);
if (idx_fd < 0)
die("Can't create %s: %s", tmpfile, strerror(errno));