Correct minor style issue in fast-import.
[gitweb.git] / git-remote.perl
index 059c141b68e829c7114d09ed9f4541b9db4c3d66..c813fe14518fc12cb8260d053d0b87d834eed47d 100755 (executable)
@@ -64,7 +64,7 @@ sub list_remote {
        my ($git) = @_;
        my %seen = ();
        my @remotes = eval {
-               $git->command(qw(repo-config --get-regexp), '^remote\.');
+               $git->command(qw(config --get-regexp), '^remote\.');
        };
        for (@remotes) {
                if (/^remote\.([^.]*)\.(\S*)\s+(.*)$/) {
@@ -103,7 +103,7 @@ sub list_branch {
        my ($git) = @_;
        my %seen = ();
        my @branches = eval {
-               $git->command(qw(repo-config --get-regexp), '^branch\.');
+               $git->command(qw(config --get-regexp), '^branch\.');
        };
        for (@branches) {
                if (/^branch\.([^.]*)\.(\S*)\s+(.*)$/) {
@@ -238,8 +238,8 @@ sub add_remote {
                print STDERR "remote $name already exists.\n";
                exit(1);
        }
-       $git->command('repo-config', "remote.$name.url", $url);
-       $git->command('repo-config', "remote.$name.fetch",
+       $git->command('config', "remote.$name.url", $url);
+       $git->command('config', "remote.$name.fetch",
                      "+refs/heads/*:refs/remotes/$name/*");
 }
 
@@ -274,4 +274,9 @@ sub add_remote {
        }
        add_remote($ARGV[1], $ARGV[2]);
 }
-
+else {
+       print STDERR "Usage: git remote\n";
+       print STDERR "       git remote add <name> <url>\n";
+       print STDERR "       git remote show <name>\n";
+       exit(1);
+}