summaryrefslogtreecommitdiffstats
path: root/bin/git
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2011-04-23 12:14:42 -0500
committerJesse Luehrs <doy@tozt.net>2011-04-23 12:14:42 -0500
commit2efd4648e679f7fa7ac6db8a646e2bd044ece4b9 (patch)
treee68e33bc63ce8cf257499b6d80ed12a9217e3d71 /bin/git
parenta38543f5d5d0a5a1dcc7c3dd3e0cf0a2b268ee27 (diff)
downloadconf-2efd4648e679f7fa7ac6db8a646e2bd044ece4b9.tar.gz
conf-2efd4648e679f7fa7ac6db8a646e2bd044ece4b9.zip
allow sending pull requests for specific branches
Diffstat (limited to 'bin/git')
-rwxr-xr-xbin/git/git-hub10
1 files changed, 7 insertions, 3 deletions
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 <owner> <repo> [title] [description]"
- unless @_ == 2 || @_ == 3 || @_ == 4;
+ my ($owner, $repo, $title, $branch, $body) = @_;
+ die "usage: git hub pullreq <owner> <repo> <title> [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
);
}