{cvs,svn}import: use the new 'git read-tree --empty'
Since fb1bb96 (read-tree: deprecate syntax without tree-ish args, 2010-09-10) not passing --empty caused a spurious warning that was shown to the user. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Thomas Rast committed
Oct 18, 2010 at 15:11 UTC
1bb28d87e1d8897db662f48455d369860758fbdd
2 files changed
+2
-2
contrib/examples/git-svnimport.perl
+1
-1
@@ -289,7 +289,7 @@ my $current_rev = $opt_s || 1;
289
unless(-d $git_dir) {
290
system("git init");
291
die "Cannot init the GIT db at $git_tree: $?\n" if $?;
292
- system("git read-tree");
292
+ system("git read-tree --empty");
293
die "Cannot init an empty tree: $?\n" if $?;
294
295
$last_branch = $opt_o;
git-cvsimport.perl
+1
-1
@@ -611,7 +611,7 @@ my %index; # holds filenames of one index per branch
611
unless (-d $git_dir) {
612
system(qw(git init));
613
die "Cannot init the GIT db at $git_tree: $?\n" if $?;
614
- system(qw(git read-tree));
614
+ system(qw(git read-tree --empty));
615
die "Cannot init an empty tree: $?\n" if $?;
616
617
$last_branch = $opt_o;