Skip to content

Commit 333968f

Browse files
authored
Merge pull request #1675 from gollth/stage-resolved-files-without-diffview
Fix: Allow `s` to stage resolved files
2 parents 0b756dd + 0a058e2 commit 333968f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lua/neogit/buffers/status/actions.lua

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1079,7 +1079,12 @@ M.n_stage = function(self)
10791079
},
10801080
})
10811081
else
1082-
notification.info("Conflicts must be resolved before staging")
1082+
if not git.merge.is_conflicted(selection.item.name) then
1083+
git.status.stage { selection.item.name }
1084+
self:dispatch_refresh({ update_diffs = { "*:" .. selection.item.name } }, "n_stage")
1085+
else
1086+
notification.info("Conflicts must be resolved before staging")
1087+
end
10831088
return
10841089
end
10851090
elseif stagable.hunk then

0 commit comments

Comments
 (0)