diff options
author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | 2006-06-24 21:42:20 +0200 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-06-24 20:08:25 -0700 |
commit | 061303f0b50a648db8e0af23791fc56181f6bf93 (patch) | |
tree | 64fd78ee76e9c4536acdce58eecb904ed00708aa /git-cvsimport.perl | |
parent | 7ccd9009ac1fb4764ddf47a1a924ea917ff9468a (diff) | |
download | git-061303f0b50a648db8e0af23791fc56181f6bf93.tar.gz |
cvsimport: always set $ENV{GIT_INDEX_FILE} to $index{$branch}
Also, make sure that the initial git-read-tree is performed.
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Diffstat (limited to 'git-cvsimport.perl')
-rwxr-xr-x | git-cvsimport.perl | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/git-cvsimport.perl b/git-cvsimport.perl index 3b892f9709..50f5d9642a 100755 --- a/git-cvsimport.perl +++ b/git-cvsimport.perl @@ -470,6 +470,9 @@ my %index; # holds filenames of one index per branch $index{$opt_o} = tmpnam(); $ENV{GIT_INDEX_FILE} = $index{$opt_o}; +system("git-read-tree", $opt_o); +die "read-tree failed: $?\n" if $?; + unless(-d $git_dir) { system("git-init-db"); die "Cannot init the GIT db at $git_tree: $?\n" if $?; @@ -813,17 +816,15 @@ while(<CVS>) { unless ($index{$branch}) { $index{$branch} = tmpnam(); $ENV{GIT_INDEX_FILE} = $index{$branch}; + system("git-read-tree", $branch); + die "read-tree failed: $?\n" if $?; } + # just in case + $ENV{GIT_INDEX_FILE} = $index{$branch}; if ($ancestor) { + print "have ancestor $ancestor" if $opt_v; system("git-read-tree", $ancestor); die "read-tree failed: $?\n" if $?; - } else { - unless ($index{$branch}) { - $index{$branch} = tmpnam(); - $ENV{GIT_INDEX_FILE} = $index{$branch}; - system("git-read-tree", $branch); - die "read-tree failed: $?\n" if $?; - } } } else { # just in case |