mirror of
https://github.com/TimUntersberger/neogit
synced 2024-09-16 14:24:09 +02:00
Merge pull request #1348 from NeogitOrg/fix/do-not-allow-reset-when-detached-head
This commit is contained in:
commit
acdefce66f
1 changed files with 5 additions and 0 deletions
|
@ -167,6 +167,11 @@ M.rename_branch = operation("rename_branch", function()
|
|||
end)
|
||||
|
||||
M.reset_branch = operation("reset_branch", function(popup)
|
||||
if not git.branch.current() then
|
||||
notification.warn("Cannot reset with detached HEAD")
|
||||
return
|
||||
end
|
||||
|
||||
if git.status.is_dirty() then
|
||||
if not input.get_permission("Uncommitted changes will be lost. Proceed?") then
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue