jesseduffield.lazygit/pkg/gui
Stefan Haller c712b1d0fe Better local branch delete confirmation
Currently we try to delete a branch normally, and if git returns an error and
its output contains the text "branch -D", then we prompt the user to force
delete, and try again using -D. Besides just being ugly, this has the
disadvantage that git's logic to decide whether a branch is merged is not very
good; it only considers a branch merged if it is either reachable from the
current head, or from its own upstream. In many cases I want to delete a branch
that has been merged to master, but I don't have master checked out, so the
current branch is really irrelevant, and it should rather (or in addition) check
whether the branch is reachable from one of the main branches. The problem is
that git doesn't know what those are.

But lazygit does, so make the check on our side, prompt the user if necessary,
and always use -D. This is both cleaner, and works better.

See this mailing list discussion for more:
https://lore.kernel.org/git/bf6308ce-3914-4b85-a04b-4a9716bac538@haller-berlin.de/
2024-09-28 11:19:32 +02:00
..
context Fix crash when viewing the divergence of a branch which is up to date with its upstream 2024-09-18 09:24:10 +02:00
controllers Better local branch delete confirmation 2024-09-28 11:19:32 +02:00
filetree Use map to quickly find children in BuildTreeFromFiles 2024-09-18 09:16:58 +02:00
keybindings Add range selection ability on list contexts 2024-01-19 10:47:21 +11:00
mergeconflicts Remove redundant variable dedeclarations 2024-05-19 16:38:21 +10:00
modes rename sha to hash 5 2024-04-12 08:33:47 +02:00
patch_exploring Allow using </> and ,/. in sticky range select mode in patch explorer 2024-08-24 10:56:20 +02:00
popup Remove return value of Alert/Confirm/Prompt 2024-09-06 08:45:48 +02:00
presentation Fix early exit condition 2024-08-24 10:51:25 +02:00
services/custom_commands Remove return value of Alert/Confirm/Prompt 2024-09-06 08:45:48 +02:00
status Clean up error handling of WithWaitingStatus and WithWaitingStatusSync 2024-04-18 10:10:30 +02:00
style Add function to render a hyperlink 2024-08-24 10:36:01 +02:00
types Remove return value of Alert/Confirm/Prompt 2024-09-06 08:45:48 +02:00
background.go Remove return value of Alert/Confirm/Prompt 2024-09-06 08:45:48 +02:00
command_log_panel.go Change direct access to Common.UserConfig to a getter 2024-08-18 10:24:52 +02:00
context.go Remove return value of IContextMgr.Push/Pop et. al. 2024-09-06 08:45:48 +02:00
context_config.go move some methods 2023-04-30 13:19:53 +10:00
controllers.go Better local branch delete confirmation 2024-09-28 11:19:32 +02:00
dummies.go Optimize number of early calls to GetRepoPaths 2024-07-06 12:09:48 -07:00
editors.go Add emacs-keybinds for word navigation 2023-08-15 12:22:17 +02:00
extras_panel.go Remove return value of IContextMgr.Push/Pop et. al. 2024-09-06 08:45:48 +02:00
global_handlers.go Use our new hyperlink support in confirmations 2024-08-24 10:36:01 +02:00
gui.go Remove return value of Alert/Confirm/Prompt 2024-09-06 08:45:48 +02:00
gui_common.go Remove return value of RenderToMainViews and some related functions 2024-09-06 08:45:48 +02:00
gui_driver.go Replace CurrentContext() with Context().Current() 2024-08-17 11:14:51 +02:00
information_panel.go Use our new hyperlink support in the information view 2024-08-24 10:36:01 +02:00
keybindings.go Remove return value of Alert/Confirm/Prompt 2024-09-06 08:45:48 +02:00
layout.go Remove return value of IContextMgr.Push/Pop et. al. 2024-09-06 08:45:48 +02:00
main_panels.go Remove return value of RenderToMainViews and some related functions 2024-09-06 08:45:48 +02:00
menu_panel.go Remove return value of IContextMgr.Push/Pop et. al. 2024-09-06 08:45:48 +02:00
options_map.go Replace CurrentContext() with Context().Current() 2024-08-17 11:14:51 +02:00
pty.go Fix possible off-by-one error wrt PTY size 2024-06-23 12:36:40 +02:00
pty_windows.go Format code to pass lint 2021-09-16 21:38:43 +08:00
recent_repos_panel.go Optimize number of early calls to GetRepoPaths 2024-07-06 12:09:48 -07:00
tasks_adapter.go Bump gocui 2024-09-06 08:45:48 +02:00
test_mode.go Don't wait in integration tests when running in headless mode 2024-06-05 14:44:02 +02:00
view_helpers.go Remove return value of IContextMgr.Push/Pop et. al. 2024-09-06 08:45:48 +02:00
views.go Set main views to underline hyperlinks only on mouse hover 2024-08-24 17:45:54 +02:00