summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8455e48)
raw | patch | inline | side by side (parent: 8455e48)
author | Shawn O. Pearce <spearce@spearce.org> | |
Tue, 16 Jan 2007 06:17:47 +0000 (01:17 -0500) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Tue, 16 Jan 2007 06:17:47 +0000 (01:17 -0500) |
Because we are renaming the packfile into its file destination we
need to be sure its not open when the rename is called, otherwise
some operating systems (e.g. Windows) may prevent the rename from
occurring.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
need to be sure its not open when the rename is called, otherwise
some operating systems (e.g. Windows) may prevent the rename from
occurring.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
fast-import.c | patch | blob | history |
diff --git a/fast-import.c b/fast-import.c
index 393020504a1d2ac3690298398a033c6a4d6ea819..a9cf22dfe22e19deba31724d67ad2f00b61c92b8 100644 (file)
--- a/fast-import.c
+++ b/fast-import.c
SHA1_Final(pack_data->sha1, &c);
write_or_die(pack_fd, pack_data->sha1, sizeof(pack_data->sha1));
+ close(pack_fd);
}
static int oecmp (const void *a_, const void *b_)
if (!new_p)
die("core git rejected index %s", idx_name);
new_p->windows = old_p->windows;
- new_p->pack_fd = old_p->pack_fd;
all_packs[pack_id++] = new_p;
install_packed_git(new_p);
}
- else {
- close(pack_fd);
+ else
unlink(old_p->pack_name);
- }
free(old_p);
/* We can't carry a delta across packfiles. */