Thread (4 messages) flat view 4 messages, 3 authors, 2016-06-15

Re: [PATCH] cvsimport - streamline temp index file creation and avoid creating empty tmpfiles

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:42:31

Hi,

On Sat, 24 Jun 2006, Martin Langhoff wrote:
On 6/24/06, Johannes Schindelin [off-list ref] wrote:
quoted
It seems that git-cvsimport makes a temporary file of size 0, which cannot
get mmap()ed, because it has size 0.
This switch to tmpnam() avoids creating the tmpfile in the first place and
streamlines the code. This handling of tmpfiles is slightly safer, but there
is an inherent race condition.
Thank you. This fixes the error.

HOWEVER, it does not fix the main problem: when I try to git-cvsimport, 
there is no index for that branch yet, since I used to git-cvsimport with 
the old cvsimport.

Now, when cvsimport sees there is no index, it evidently assumes that the 
current state is an empty tree, which is *not* true.

The effect is: the first commit removes all files from the tree which were 
not touched by the cvs commit. Bad.
This usage of tempfiles is open to a race condition
I would not care too strongly about that. Eventually, I really would like 
this file to reside in $GIT_DIR, not /tmp, but whatever. That is not my 
biggest concern right now. That I cannot update since June 18th, however, 
is.

Ciao,
Dscho
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help