threads / patch / 25469

patch{cvs,svn}import: use the new 'git read-tree --empty'

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

## tl;dr

One message between Oct 18, 2010 and Oct 18, 2010. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Thomas Rast· Oct 18, 2010, 13:11 UTC · lore

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(-)
Show changes to 2 files +2 −2

contrib/examples/git-svnimport.perl, git-cvsimport.perl

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

← back to recent threads