From b60ae4d5578eba82b7382dabaef88faa660a3f2b Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Mon, 5 Sep 2011 20:06:11 -0500 Subject: add command for getting pull requests from github --- bin/git/git-hub | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'bin/git') diff --git a/bin/git/git-hub b/bin/git/git-hub index bf489be..953aa9c 100755 --- a/bin/git/git-hub +++ b/bin/git/git-hub @@ -199,6 +199,16 @@ sub run_command_add { git "fetch $remote"; } +sub run_command_pull { + my $self = shift; + die "usage: git hub pull " + unless @_ == 1; + my ($num) = @_; + + my $remote = (any { /\bgithub\b/ } git "remote") ? 'github' : 'origin'; + git "fetch $remote refs/pull/$num/head:pull-$num"; +} + sub _github { my $self = shift; my %opts = @_; -- cgit v1.2.3-54-g00ecf