提交 061303f0 编写于 作者: J Johannes Schindelin 提交者: Junio C Hamano

cvsimport: always set $ENV{GIT_INDEX_FILE} to $index{$branch}

Also, make sure that the initial git-read-tree is performed.
Signed-off-by: NJohannes Schindelin <Johannes.Schindelin@gmx.de>
上级 7ccd9009
......@@ -470,6 +470,9 @@ ($$)
$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 @@ sub commit {
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册