We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f1b7dba commit 4cd696aCopy full SHA for 4cd696a
lib/git_chain/commands/push.rb
@@ -36,13 +36,13 @@ def run(options)
36
branch_remote, upstream_branch = upstream.split('/', 2)
37
if remote && branch_remote != remote
38
raise(Abort, "Multiple remotes detected: #{remote}, #{branch_remote}") if remote != branch_remote
39
- else
+ elsif upstream_branch
40
remote = branch_remote
41
end
42
upstreams[b] = upstream_branch
43
- elsif options[:set_upstream]
44
- upstreams[b] = b
45
+
+ upstreams[b] ||= b if options[:set_upstream]
46
47
48
raise(Abort, "Nothing to push") if upstreams.empty?
0 commit comments