# [PATCH] {cvs,svn}import: use the new 'git read-tree --empty'

1 messages from 2010-10-18 to 2010-10-18. Participants: Thomas Rast.
Thread: https://gitlist.dev/t/25469

## Thomas Rast, 2010-10-18 13:11

Subject: [PATCH] {cvs,svn}import: use the new 'git read-tree --empty'
Message-ID: <ed4d2a5ba3f219dbaba501e9ae3701d5e96322a1.1287407371.git.trast@student.ethz.ch>
URL: https://gitlist.dev/e/ed4d2a5ba3f219dbaba501e9ae3701d5e96322a1.1287407371.git.trast%40student.ethz.ch

```
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>
---
 contrib/examples/git-svnimport.perl |    2 +-
 git-cvsimport.perl                  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/contrib/examples/git-svnimport.perl b/contrib/examples/git-svnimport.perl
index ead4c04..b09ff8f 100755
--- a/contrib/examples/git-svnimport.perl
+++ b/contrib/examples/git-svnimport.perl
@@ -289,7 +289,7 @@ my $current_rev = $opt_s || 1;
 unless(-d $git_dir) {
 	system("git init");
 	die "Cannot init the GIT db at $git_tree: $?\n" if $?;
-	system("git read-tree");
+	system("git read-tree --empty");
 	die "Cannot init an empty tree: $?\n" if $?;
 
 	$last_branch = $opt_o;
diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index 249aeaf..d27abfe 100755
--- a/git-cvsimport.perl
+++ b/git-cvsimport.perl
@@ -612,7 +612,7 @@ my %index; # holds filenames of one index per branch
 unless (-d $git_dir) {
 	system(qw(git init));
 	die "Cannot init the GIT db at $git_tree: $?\n" if $?;
-	system(qw(git read-tree));
+	system(qw(git read-tree --empty));
 	die "Cannot init an empty tree: $?\n" if $?;
 
 	$last_branch = $opt_o;
-- 
1.7.3.1.270.gbc760

```
