summaryrefslogtreecommitdiff
path: root/index-pack.c
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2007-03-24 11:58:22 -0400
committerJunio C Hamano <junkio@cox.net>2007-03-24 22:32:39 -0700
commit0e55181f29ee6599ab6888ac54d186c83d355a70 (patch)
treed237011873162cb78bab4cea1c79b5c11ec7f0d1 /index-pack.c
parent46d409d0bf25b361f812eec4888c46509c203a6d (diff)
downloadgit-0e55181f29ee6599ab6888ac54d186c83d355a70.tar.gz
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 'index-pack.c')
-rw-r--r--index-pack.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/index-pack.c b/index-pack.c
index 61eb20e45b..6284fe3760 100644
--- a/index-pack.c
+++ b/index-pack.c
@@ -139,7 +139,7 @@ static const char *open_pack_file(const char *pack_name)
if (!pack_name) {
static char tmpfile[PATH_MAX];
snprintf(tmpfile, sizeof(tmpfile),
- "%s/pack_XXXXXX", get_object_directory());
+ "%s/tmp_pack_XXXXXX", get_object_directory());
output_fd = mkstemp(tmpfile);
pack_name = xstrdup(tmpfile);
} else
@@ -690,7 +690,7 @@ static const char *write_index_file(const char *index_name, unsigned char *sha1)
if (!index_name) {
static char tmpfile[PATH_MAX];
snprintf(tmpfile, sizeof(tmpfile),
- "%s/index_XXXXXX", get_object_directory());
+ "%s/tmp_idx_XXXXXX", get_object_directory());
fd = mkstemp(tmpfile);
index_name = xstrdup(tmpfile);
} else {