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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/24/06, Johannes Schindelin <Johannes.Schindelin@xxxxxx> wrote:
Thank you. This fixes the error.

Your welcome!

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.

I don't quite understand. No it shouldn't be the case -- it should
create the index using git-read-tree based on the tip of the branch.
Right after the call to tmpnam() the code looks like

$index{$branch} = tmpnam();
$ENV{GIT_INDEX_FILE} = $index{$branch};
system("git-read-tree", $branch);
die "read-tree failed: $?\n" if $?;

> 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.

It's worrying me too. Running some tests now...




martin
-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]