@matheusbsbs / matheus-bagliano / commits / 3ca9364222
Fork 0

Convert git-* invocations to "git *" in the svnimport example.

After these changes, git-svnimport worked fine for me. Signed-off-by: Abhijit Menon-Sen <ams@toroid.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Abhijit Menon-Sen committed Feb 25, 2009 at 08:33 UTC 3ca936422212370481850d67cab80b1e517b2d80
1 file changed +18 -18
contrib/examples/git-svnimport.perl
+18 -18
@@ -287,9 +287,9 @@ my $last_rev = "";
287 my $last_branch;
288 my $current_rev = $opt_s || 1;
289 unless(-d $git_dir) {
290 - system("git-init");
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");
293 die "Cannot init an empty tree: $?\n" if $?;
294
295 $last_branch = $opt_o;
@@ -303,7 +303,7 @@ unless(-d $git_dir) {
303 -f "$git_dir/svn2git"
304 or die "'$git_dir/svn2git' does not exist.\n".
305 "You need that file for incremental imports.\n";
306 - open(F, "git-symbolic-ref HEAD |") or
306 + open(F, "git symbolic-ref HEAD |") or
307 die "Cannot run git-symbolic-ref: $!\n";
308 chomp ($last_branch = <F>);
309 $last_branch = basename($last_branch);
@@ -331,7 +331,7 @@ EOM
331 "$git_dir/refs/heads/$opt_o") == 0;
332
333 # populate index
334 - system('git-read-tree', $last_rev);
334 + system('git', 'read-tree', $last_rev);
335 die "read-tree failed: $?\n" if $?;
336
337 # Get the last import timestamps
@@ -399,7 +399,7 @@ sub get_file($$$) {
399 my $pid = open(my $F, '-|');
400 die $! unless defined $pid;
401 if (!$pid) {
402 - exec("git-hash-object", "-w", $name)
402 + exec("git", "hash-object", "-w", $name)
403 or die "Cannot create object: $!\n";
404 }
405 my $sha = <$F>;
@@ -423,7 +423,7 @@ sub get_ignore($$$$$) {
423 my $pid = open(my $F, '-|');
424 die $! unless defined $pid;
425 if (!$pid) {
426 - exec("git-hash-object", "-w", $name)
426 + exec("git", "hash-object", "-w", $name)
427 or die "Cannot create object: $!\n";
428 }
429 my $sha = <$F>;
@@ -547,7 +547,7 @@ sub copy_path($$$$$$$$) {
547 my $pid = open my $f,'-|';
548 die $! unless defined $pid;
549 if (!$pid) {
550 - exec("git-ls-tree","-r","-z",$gitrev,$srcpath)
550 + exec("git","ls-tree","-r","-z",$gitrev,$srcpath)
551 or die $!;
552 }
553 local $/ = "\0";
@@ -634,7 +634,7 @@ sub commit {
634
635 my $rev;
636 if($revision > $opt_s and defined $parent) {
637 - open(H,'-|',"git-rev-parse","--verify",$parent);
637 + open(H,'-|',"git","rev-parse","--verify",$parent);
638 $rev = <H>;
639 close(H) or do {
640 print STDERR "$revision: cannot find commit '$parent'!\n";
@@ -671,7 +671,7 @@ sub commit {
671 unlink($git_index);
672 } elsif ($rev ne $last_rev) {
673 print "Switching from $last_rev to $rev ($branch)\n" if $opt_v;
674 - system("git-read-tree", $rev);
674 + system("git", "read-tree", $rev);
675 die "read-tree failed for $rev: $?\n" if $?;
676 $last_rev = $rev;
677 }
@@ -740,7 +740,7 @@ sub commit {
740 my $pid = open my $F, "-|";
741 die "$!" unless defined $pid;
742 if (!$pid) {
743 - exec("git-ls-files", "-z", @o1) or die $!;
743 + exec("git", "ls-files", "-z", @o1) or die $!;
744 }
745 @o1 = ();
746 local $/ = "\0";
@@ -758,7 +758,7 @@ sub commit {
758 @o2 = @o1;
759 @o1 = ();
760 }
761 - system("git-update-index","--force-remove","--",@o2);
761 + system("git","update-index","--force-remove","--",@o2);
762 die "Cannot remove files: $?\n" if $?;
763 }
764 }
@@ -770,7 +770,7 @@ sub commit {
770 @n2 = @new;
771 @new = ();
772 }
773 - system("git-update-index","--add",
773 + system("git","update-index","--add",
774 (map { ('--cacheinfo', @$_) } @n2));
775 die "Cannot add files: $?\n" if $?;
776 }
@@ -778,7 +778,7 @@ sub commit {
778 my $pid = open(C,"-|");
779 die "Cannot fork: $!" unless defined $pid;
780 unless($pid) {
781 - exec("git-write-tree");
781 + exec("git","write-tree");
782 die "Cannot exec git-write-tree: $!\n";
783 }
784 chomp(my $tree = <C>);
@@ -830,7 +830,7 @@ sub commit {
830 "GIT_COMMITTER_NAME=$committer_name",
831 "GIT_COMMITTER_EMAIL=$committer_email",
832 "GIT_COMMITTER_DATE=".strftime("+0000 %Y-%m-%d %H:%M:%S",gmtime($date)),
833 - "git-commit-tree", $tree,@par);
833 + "git", "commit-tree", $tree,@par);
834 die "Cannot exec git-commit-tree: $!\n";
835 }
836 $pw->writer();
@@ -874,7 +874,7 @@ sub commit {
874
875 $dest =~ tr/_/\./ if $opt_u;
876
877 - system('git-tag', '-f', $dest, $cid) == 0
877 + system('git', 'tag', '-f', $dest, $cid) == 0
878 or die "Cannot create tag $dest: $!\n";
879
880 print "Created tag '$dest' on '$branch'\n" if $opt_v;
@@ -937,7 +937,7 @@ while ($to_rev < $opt_l) {
937 my $pid = fork();
938 die "Fork: $!\n" unless defined $pid;
939 unless($pid) {
940 - exec("git-repack", "-d")
940 + exec("git", "repack", "-d")
941 or die "Cannot repack: $!\n";
942 }
943 waitpid($pid, 0);
@@ -958,7 +958,7 @@ if($orig_branch) {
958 system("cp","$git_dir/refs/heads/$opt_o","$git_dir/refs/heads/master")
959 if $forward_master;
960 unless ($opt_i) {
961 - system('git-read-tree', '-m', '-u', 'SVN2GIT_HEAD', 'HEAD');
961 + system('git', 'read-tree', '-m', '-u', 'SVN2GIT_HEAD', 'HEAD');
962 die "read-tree failed: $?\n" if $?;
963 }
964 } else {
@@ -966,7 +966,7 @@ if($orig_branch) {
966 print "DONE; creating $orig_branch branch\n" if $opt_v and (not defined $opt_l or $opt_l > 0);
967 system("cp","$git_dir/refs/heads/$opt_o","$git_dir/refs/heads/master")
968 unless -f "$git_dir/refs/heads/master";
969 - system('git-update-ref', 'HEAD', "$orig_branch");
969 + system('git', 'update-ref', 'HEAD', "$orig_branch");
970 unless ($opt_i) {
971 system('git checkout');
972 die "checkout failed: $?\n" if $?;