Skip to content

Commit 953b8b5

Browse files
committed
Don't provided final param if branch is nil
1 parent 62ecb3f commit 953b8b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/git/lib.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ def checkout(branch, opts = {})
493493
else
494494
arr_opts << '-b' << opts[:new_branch] if opts[:new_branch]
495495
end
496-
arr_opts << branch
496+
arr_opts << branch if branch
497497

498498
command('checkout', arr_opts)
499499
end

0 commit comments

Comments
 (0)