lib/grb.rb in jinzhu-grb-0.2.0 vs lib/grb.rb in jinzhu-grb-0.2.1
- old
+ new
@@ -61,10 +61,12 @@
'if local_branches.include?(branch)
"#{GIT} config branch.#{branch}.remote #{origin}\n" +
"#{GIT} config branch.#{branch}.merge refs/heads/#{branch}"
else
"#{GIT} branch --track #{branch} #{origin}/#{branch}"
- end'
+ end',
+ '"#{GIT} checkout #{branch}" if current_branch != branch',
+ '"#{GIT} merge #{origin}/#{branch}"',
]
},
:track => {
:desc => "=> track branch\ngit track `branch` [--explain]",