fix: check local branch up-to-date on remote before creating comment

This commit is contained in:
Jakub F. Bortlík
2026-02-28 07:44:58 +01:00
parent 3d2828a950
commit d67484fe87

View File

@@ -349,6 +349,10 @@ M.can_create_comment = function(must_be_visual)
return false return false
end end
if not git.check_current_branch_up_to_date_on_remote(vim.log.levels.ERROR) then
return false
end
-- Check we're in visual mode for code suggestions and multiline comments -- Check we're in visual mode for code suggestions and multiline comments
if must_be_visual and not u.check_visual_mode() then if must_be_visual and not u.check_visual_mode() then
return false return false