author | Shawn O. Pearce <spearce@spearce.org> | |
Tue, 16 Jan 2007 06:15:31 +0000 (01:15 -0500) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Tue, 16 Jan 2007 06:15:31 +0000 (01:15 -0500) | ||
commit | 8455e48476634eeff6fd2cd4f245cadfef14bbc8 | |
tree | cc1c872ffac6807c1fccd50be15c447bcf6f4d46 | tree | snapshot |
parent | 09543c96bbe41d312bc002c293a193aa328c839d | commit | diff |
Use .keep files in fast-import during processing.
Because fast-import automatically updates all references (heads
and tags) at the end of its run the repository is corrupt unless
the objects are available in the .git/objects/pack directory prior
to the refs being modified. The easiest way to ensure that is true
is to move the packfile and its associated index directly into the
.git/objects/pack directory as soon as we have finished output to it.
But the only safe way to do this is to create the a temporary .keep
file for that pack, so we use the same tricks that index-pack uses
when its being invoked by receive-pack.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Because fast-import automatically updates all references (heads
and tags) at the end of its run the repository is corrupt unless
the objects are available in the .git/objects/pack directory prior
to the refs being modified. The easiest way to ensure that is true
is to move the packfile and its associated index directly into the
.git/objects/pack directory as soon as we have finished output to it.
But the only safe way to do this is to create the a temporary .keep
file for that pack, so we use the same tricks that index-pack uses
when its being invoked by receive-pack.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
fast-import.c | diff | blob | history |