Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/git_chain/commands/push.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ def run(options)
branch_remote, upstream_branch = upstream.split("/", 2)
if remote && branch_remote != remote
raise(Abort, "Multiple remotes detected: #{remote}, #{branch_remote}") if remote != branch_remote
else
elsif upstream_branch
remote = branch_remote
end
upstreams[b] = upstream_branch
elsif options[:set_upstream]
upstreams[b] = b
end

upstreams[b] ||= b if options[:set_upstream]
end

raise(Abort, "Nothing to push") if upstreams.empty?
Expand Down