jesseduffield.lazygit/pkg/gui
Jesse Duffield 26ca41a40e Handle pending actions properly in git commands that require credentials
I don't know if this is a hack or not: we run a git command and increment the pending action
count to 1 but at some point the command requests a username or password, so we need to prompt
the user to enter that. At that point we don't want to say that there is a pending action,
so we decrement the action count before prompting the user and then re-increment it again afterward.

Given that we panic when the counter goes below zero, it's important that it's not zero
when we run the git command (should be impossible anyway).

I toyed with a different approach using channels and a long-running goroutine that
handles all commands that request credentials but it feels over-engineered compared to this
commit's approach.
2023-07-08 22:54:52 +10:00
..
context Add busy count for integration tests 2023-07-08 22:54:52 +10:00
controllers Handle pending actions properly in git commands that require credentials 2023-07-08 22:54:52 +10:00
filetree Support filtering files 2023-07-03 12:54:13 +10:00
keybindings Use same labels for keys that we use in the config 2023-05-21 10:59:16 +10:00
mergeconflicts migrate patch building tests 2023-02-25 21:37:16 +11:00
modes refactor cherry pick code to move state access out of helper 2023-04-30 13:19:53 +10:00
patch_exploring refactor patch code 2023-03-19 16:30:39 +11:00
popup Add busy count for integration tests 2023-07-08 22:54:52 +10:00
presentation Insert fake todo entry for a conflicting commit that is being applied 2023-06-22 18:57:58 +02:00
services/custom_commands Support authors and tags in custom command suggestions preset 2023-06-07 10:18:01 +10:00
status lots of changes 2023-04-30 13:19:53 +10:00
style Stop hiding underscores for VSCode 2023-06-01 20:12:20 +10:00
types Add busy count for integration tests 2023-07-08 22:54:52 +10:00
background.go Add busy count for integration tests 2023-07-08 22:54:52 +10:00
command_log_panel.go Introduce filtered list view model 2023-07-03 12:54:13 +10:00
context.go Add integration tests for searching/filtering 2023-07-03 12:54:14 +10:00
context_config.go move some methods 2023-04-30 13:19:53 +10:00
controllers.go Introduce filtered list view model 2023-07-03 12:54:13 +10:00
dummies.go feat: add GitVersion struct 2022-12-30 20:01:14 +09:00
editors.go Introduce filtered list view model 2023-07-03 12:54:13 +10:00
extras_panel.go Appease linter 2023-06-03 15:54:03 +10:00
file_watching.go Add busy count for integration tests 2023-07-08 22:54:52 +10:00
global_handlers.go Use sentence case everywhere 2023-05-25 23:52:19 +10:00
gui.go Handle pending actions properly in git commands that require credentials 2023-07-08 22:54:52 +10:00
gui_common.go Add busy count for integration tests 2023-07-08 22:54:52 +10:00
gui_driver.go Add busy count for integration tests 2023-07-08 22:54:52 +10:00
information_panel.go lots of changes 2023-04-30 13:19:53 +10:00
keybindings.go Introduce filtered list view model 2023-07-03 12:54:13 +10:00
layout.go Add busy count for integration tests 2023-07-08 22:54:52 +10:00
main_panels.go Visualize the "ignore whitespace" state in the subtitle of the diff view 2023-05-20 12:58:32 +10:00
menu_panel.go Introduce filtered list view model 2023-07-03 12:54:13 +10:00
options_map.go Use sentence case everywhere 2023-05-25 23:52:19 +10:00
pty.go Make sure scrollbars have the right size initially 2023-03-21 18:26:18 +01:00
pty_windows.go Format code to pass lint 2021-09-16 21:38:43 +08:00
recent_repos_panel.go Begin refactoring gui 2023-04-30 13:19:52 +10:00
tasks_adapter.go Add busy count for integration tests 2023-07-08 22:54:52 +10:00
test_mode.go Add busy count for integration tests 2023-07-08 22:54:52 +10:00
view_helpers.go lots more refactoring 2023-04-30 13:19:53 +10:00
views.go Color view frame differently when searching/filtering 2023-07-03 12:54:14 +10:00