diff options
Diffstat (limited to 'bin/git/git-hub')
-rwxr-xr-x | bin/git/git-hub | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/bin/git/git-hub b/bin/git/git-hub index e2bee74..6f2fe7d 100755 --- a/bin/git/git-hub +++ b/bin/git/git-hub @@ -131,8 +131,7 @@ sub run_command_clone { $self->run_command_clone($repo); { my $d = pushd($repo); - git "remote add $owner git://github.com/$owner/$repo.git"; - git "remote update"; + $self->run_command_add($owner, $repo); } } else { @@ -175,6 +174,16 @@ sub run_command_pullreq { ); } +sub run_command_add { + my $self = shift; + my ($owner, $repo) = @_; + die "usage: git hub add <owner> <repo>" + unless @_ == 2; + + git "remote add $owner git://github.com/$owner/$repo.git"; + git "fetch $owner"; +} + sub _github { my $self = shift; my %opts = @_; |