git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Thomas Rast <trast@student.ethz.ch>
Date
Oct 18, 2010, 13:11 UTC
Message-ID
<ed4d2a5ba3f219dbaba501e9ae3701d5e96322a1.1287407371.git.trast@student.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
Message 1 of 1 in “{cvs,svn}import: use the new 'git read-tree --empty'”
  1. {cvs,svn}import: use the new 'git read-tree --empty'Thomas Rast, Oct 18, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.