Skip to content

Commit

Permalink
Better error for pull requests [stephencelis#52].
Browse files Browse the repository at this point in the history
  • Loading branch information
stephencelis committed May 4, 2012
1 parent 8213811 commit 13fcc4f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion ghi
Expand Up @@ -2983,7 +2983,9 @@ EOF
if assigns[:head]
assigns[:head].sub!(/:$/, ":#{head}")
else
abort "fatal: HEAD can't be null"
abort <<EOF.chomp
fatal: HEAD can't be null. (Is your current branch being tracked upstream?)
EOF
end
throb { api.post "/repos/#{repo}/pulls", assigns }
base = [repo.split('/').first, assigns[:base]].join ':'
Expand Down
4 changes: 3 additions & 1 deletion lib/ghi/commands/edit.rb
Expand Up @@ -119,7 +119,9 @@ def execute
if assigns[:head]
assigns[:head].sub!(/:$/, ":#{head}")
else
abort "fatal: HEAD can't be null"
abort <<EOF.chomp
fatal: HEAD can't be null. (Is your current branch being tracked upstream?)
EOF
end
throb { api.post "/repos/#{repo}/pulls", assigns }
base = [repo.split('/').first, assigns[:base]].join ':'
Expand Down

0 comments on commit 13fcc4f

Please sign in to comment.