summaryrefslogtreecommitdiffstats
path: root/bin/git
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2011-09-05 20:06:11 -0500
committerJesse Luehrs <doy@tozt.net>2011-09-05 20:08:10 -0500
commitb60ae4d5578eba82b7382dabaef88faa660a3f2b (patch)
tree81957a0512edec45bed0e8a9c9cc114499b15e7d /bin/git
parent0a58dd8ca4d962998b077da24b3985988b3f3092 (diff)
downloadconf-b60ae4d5578eba82b7382dabaef88faa660a3f2b.tar.gz
conf-b60ae4d5578eba82b7382dabaef88faa660a3f2b.zip
add command for getting pull requests from github
Diffstat (limited to 'bin/git')
-rwxr-xr-xbin/git/git-hub10
1 files changed, 10 insertions, 0 deletions
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 <num>"
+ 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 = @_;