From 2efd4648e679f7fa7ac6db8a646e2bd044ece4b9 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sat, 23 Apr 2011 12:14:42 -0500 Subject: allow sending pull requests for specific branches --- bin/git/git-hub | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'bin/git') diff --git a/bin/git/git-hub b/bin/git/git-hub index f567420..bf489be 100755 --- a/bin/git/git-hub +++ b/bin/git/git-hub @@ -165,13 +165,17 @@ sub run_command_list { sub run_command_pullreq { my $self = shift; - my ($owner, $repo, $title, $body) = @_; - die "usage: git hub pullreq [title] [description]" - unless @_ == 2 || @_ == 3 || @_ == 4; + my ($owner, $repo, $title, $branch, $body) = @_; + die "usage: git hub pullreq [branch] [description]" + unless @_ == 3 || @_ == 4 || @_ == 5; + + # XXX: should default to the current branch + $branch ||= 'master'; $self->_github(owner => $owner, repo => $repo)->pull_request->pull_request( title => $title, body => $body, + head => $self->user . ':' . $branch ); } -- cgit v1.2.3-54-g00ecf