File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 90
90
91
91
--- @param name string
92
92
--- @param args ? string[]
93
+ --- @return ProcessResult
93
94
function M .track (name , args )
94
- git .cli .checkout .track (name ).arg_list (args or {}).call { await = true }
95
+ return git .cli .checkout .track (name ).arg_list (args or {}).call { await = true }
95
96
end
96
97
97
98
--- @param include_current ? boolean
Original file line number Diff line number Diff line change @@ -189,7 +189,12 @@ function M.checkout_local_branch(popup)
189
189
190
190
if target then
191
191
if vim .tbl_contains (remote_branches , target ) then
192
- git .branch .track (target , popup :get_arguments ())
192
+ local result = git .branch .track (target , popup :get_arguments ())
193
+ if result .code > 0 then
194
+ notification .error (table.concat (result .stderr , " \n " ))
195
+ return
196
+ end
197
+
193
198
notification .info (" Created local branch " .. target .. " tracking remote" )
194
199
event .send (" BranchCheckout" , { branch_name = target })
195
200
elseif not vim .tbl_contains (options , target ) then
You can’t perform that action at this time.
0 commit comments