{"thread":{"id":"18007","subject":"[PATCH] Convert git-* invocations to \"git *\" in the svnimport example.","startedAt":"2009-02-25T03:03:14Z","lastAt":"2009-02-25T09:54:21Z","messageCount":2,"participants":["Abhijit Menon-Sen","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"106132","messageId":"1235530994-30880-1-git-send-email-ams@toroid.org","threadId":"18007","inReplyTo":null,"subject":"[PATCH] Convert git-* invocations to \"git *\" in the svnimport example.","fromName":"Abhijit Menon-Sen","fromEmail":"ams@toroid.org","sentAt":"2009-02-25T03:03:14Z","receivedAt":"2009-02-25T03:03:14Z","isPatch":true,"sender":{"key":"ams@toroid.org","avatar":null},"body":"After these changes, git-svnimport worked fine for me.\n\nSigned-off-by: Abhijit Menon-Sen <ams@toroid.org>\n---\n contrib/examples/git-svnimport.perl |   36 +++++++++++++++++-----------------\n 1 files changed, 18 insertions(+), 18 deletions(-)\n\ndiff --git a/contrib/examples/git-svnimport.perl b/contrib/examples/git-svnimport.perl\nindex a13bb6a..4576c4a 100755\n--- a/contrib/examples/git-svnimport.perl\n+++ b/contrib/examples/git-svnimport.perl\n@@ -287,9 +287,9 @@ my $last_rev = \"\";\n my $last_branch;\n my $current_rev = $opt_s || 1;\n unless(-d $git_dir) {\n-\tsystem(\"git-init\");\n+\tsystem(\"git init\");\n \tdie \"Cannot init the GIT db at $git_tree: $?\\n\" if $?;\n-\tsystem(\"git-read-tree\");\n+\tsystem(\"git read-tree\");\n \tdie \"Cannot init an empty tree: $?\\n\" if $?;\n \n \t$last_branch = $opt_o;\n@@ -303,7 +303,7 @@ unless(-d $git_dir) {\n \t-f \"$git_dir/svn2git\"\n \t\tor die \"'$git_dir/svn2git' does not exist.\\n\".\n \t\t       \"You need that file for incremental imports.\\n\";\n-\topen(F, \"git-symbolic-ref HEAD |\") or\n+\topen(F, \"git symbolic-ref HEAD |\") or\n \t\tdie \"Cannot run git-symbolic-ref: $!\\n\";\n \tchomp ($last_branch = <F>);\n \t$last_branch = basename($last_branch);\n@@ -331,7 +331,7 @@ EOM\n \t\t\t\t\"$git_dir/refs/heads/$opt_o\") == 0;\n \n \t# populate index\n-\tsystem('git-read-tree', $last_rev);\n+\tsystem('git', 'read-tree', $last_rev);\n \tdie \"read-tree failed: $?\\n\" if $?;\n \n \t# Get the last import timestamps\n@@ -399,7 +399,7 @@ sub get_file($$$) {\n \tmy $pid = open(my $F, '-|');\n \tdie $! unless defined $pid;\n \tif (!$pid) {\n-\t    exec(\"git-hash-object\", \"-w\", $name)\n+\t    exec(\"git\", \"hash-object\", \"-w\", $name)\n \t\tor die \"Cannot create object: $!\\n\";\n \t}\n \tmy $sha = <$F>;\n@@ -423,7 +423,7 @@ sub get_ignore($$$$$) {\n \t\tmy $pid = open(my $F, '-|');\n \t\tdie $! unless defined $pid;\n \t\tif (!$pid) {\n-\t\t\texec(\"git-hash-object\", \"-w\", $name)\n+\t\t\texec(\"git\", \"hash-object\", \"-w\", $name)\n \t\t\t    or die \"Cannot create object: $!\\n\";\n \t\t}\n \t\tmy $sha = <$F>;\n@@ -547,7 +547,7 @@ sub copy_path($$$$$$$$) {\n \tmy $pid = open my $f,'-|';\n \tdie $! unless defined $pid;\n \tif (!$pid) {\n-\t\texec(\"git-ls-tree\",\"-r\",\"-z\",$gitrev,$srcpath)\n+\t\texec(\"git\",\"ls-tree\",\"-r\",\"-z\",$gitrev,$srcpath)\n \t\t\tor die $!;\n \t}\n \tlocal $/ = \"\\0\";\n@@ -634,7 +634,7 @@ sub commit {\n \n \tmy $rev;\n \tif($revision > $opt_s and defined $parent) {\n-\t\topen(H,'-|',\"git-rev-parse\",\"--verify\",$parent);\n+\t\topen(H,'-|',\"git\",\"rev-parse\",\"--verify\",$parent);\n \t\t$rev = <H>;\n \t\tclose(H) or do {\n \t\t\tprint STDERR \"$revision: cannot find commit '$parent'!\\n\";\n@@ -671,7 +671,7 @@ sub commit {\n \t\tunlink($git_index);\n \t} elsif ($rev ne $last_rev) {\n \t\tprint \"Switching from $last_rev to $rev ($branch)\\n\" if $opt_v;\n-\t\tsystem(\"git-read-tree\", $rev);\n+\t\tsystem(\"git\", \"read-tree\", $rev);\n \t\tdie \"read-tree failed for $rev: $?\\n\" if $?;\n \t\t$last_rev = $rev;\n \t}\n@@ -740,7 +740,7 @@ sub commit {\n \t\t\tmy $pid = open my $F, \"-|\";\n \t\t\tdie \"$!\" unless defined $pid;\n \t\t\tif (!$pid) {\n-\t\t\t\texec(\"git-ls-files\", \"-z\", @o1) or die $!;\n+\t\t\t\texec(\"git\", \"ls-files\", \"-z\", @o1) or die $!;\n \t\t\t}\n \t\t\t@o1 = ();\n \t\t\tlocal $/ = \"\\0\";\n@@ -758,7 +758,7 @@ sub commit {\n \t\t\t\t\t@o2 = @o1;\n \t\t\t\t\t@o1 = ();\n \t\t\t\t}\n-\t\t\t\tsystem(\"git-update-index\",\"--force-remove\",\"--\",@o2);\n+\t\t\t\tsystem(\"git\",\"update-index\",\"--force-remove\",\"--\",@o2);\n \t\t\t\tdie \"Cannot remove files: $?\\n\" if $?;\n \t\t\t}\n \t\t}\n@@ -770,7 +770,7 @@ sub commit {\n \t\t\t\t@n2 = @new;\n \t\t\t\t@new = ();\n \t\t\t}\n-\t\t\tsystem(\"git-update-index\",\"--add\",\n+\t\t\tsystem(\"git\",\"update-index\",\"--add\",\n \t\t\t\t(map { ('--cacheinfo', @$_) } @n2));\n \t\t\tdie \"Cannot add files: $?\\n\" if $?;\n \t\t}\n@@ -778,7 +778,7 @@ sub commit {\n \t\tmy $pid = open(C,\"-|\");\n \t\tdie \"Cannot fork: $!\" unless defined $pid;\n \t\tunless($pid) {\n-\t\t\texec(\"git-write-tree\");\n+\t\t\texec(\"git\",\"write-tree\");\n \t\t\tdie \"Cannot exec git-write-tree: $!\\n\";\n \t\t}\n \t\tchomp(my $tree = <C>);\n@@ -830,7 +830,7 @@ sub commit {\n \t\t\t\t\"GIT_COMMITTER_NAME=$committer_name\",\n \t\t\t\t\"GIT_COMMITTER_EMAIL=$committer_email\",\n \t\t\t\t\"GIT_COMMITTER_DATE=\".strftime(\"+0000 %Y-%m-%d %H:%M:%S\",gmtime($date)),\n-\t\t\t\t\"git-commit-tree\", $tree,@par);\n+\t\t\t\t\"git\", \"commit-tree\", $tree,@par);\n \t\t\tdie \"Cannot exec git-commit-tree: $!\\n\";\n \t\t}\n \t\t$pw->writer();\n@@ -874,7 +874,7 @@ sub commit {\n \n \t\t$dest =~ tr/_/\\./ if $opt_u;\n \n-\t\tsystem('git-tag', '-f', $dest, $cid) == 0\n+\t\tsystem('git', 'tag', '-f', $dest, $cid) == 0\n \t\t\tor die \"Cannot create tag $dest: $!\\n\";\n \n \t\tprint \"Created tag '$dest' on '$branch'\\n\" if $opt_v;\n@@ -937,7 +937,7 @@ while ($to_rev < $opt_l) {\n \tmy $pid = fork();\n \tdie \"Fork: $!\\n\" unless defined $pid;\n \tunless($pid) {\n-\t\texec(\"git-repack\", \"-d\")\n+\t\texec(\"git\", \"repack\", \"-d\")\n \t\t\tor die \"Cannot repack: $!\\n\";\n \t}\n \twaitpid($pid, 0);\n@@ -958,7 +958,7 @@ if($orig_branch) {\n \tsystem(\"cp\",\"$git_dir/refs/heads/$opt_o\",\"$git_dir/refs/heads/master\")\n \t\tif $forward_master;\n \tunless ($opt_i) {\n-\t\tsystem('git-read-tree', '-m', '-u', 'SVN2GIT_HEAD', 'HEAD');\n+\t\tsystem('git', 'read-tree', '-m', '-u', 'SVN2GIT_HEAD', 'HEAD');\n \t\tdie \"read-tree failed: $?\\n\" if $?;\n \t}\n } else {\n@@ -966,7 +966,7 @@ if($orig_branch) {\n \tprint \"DONE; creating $orig_branch branch\\n\" if $opt_v and (not defined $opt_l or $opt_l > 0);\n \tsystem(\"cp\",\"$git_dir/refs/heads/$opt_o\",\"$git_dir/refs/heads/master\")\n \t\tunless -f \"$git_dir/refs/heads/master\";\n-\tsystem('git-update-ref', 'HEAD', \"$orig_branch\");\n+\tsystem('git', 'update-ref', 'HEAD', \"$orig_branch\");\n \tunless ($opt_i) {\n \t\tsystem('git checkout');\n \t\tdie \"checkout failed: $?\\n\" if $?;\n-- \n1.6.1.2.253.ga34a\n"},{"id":"106193","messageId":"7v63iy6dv6.fsf@gitster.siamese.dyndns.org","threadId":"18007","inReplyTo":"1235530994-30880-1-git-send-email-ams@toroid.org","subject":"Re: [PATCH] Convert git-* invocations to \"git *\" in the svnimport example.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-02-25T09:54:21Z","receivedAt":"2009-02-25T09:54:21Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thanks.\n"}]}