mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-14 01:26:24 -04:00
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. |
||
|---|---|---|
| .. | ||
| cmd_obj.go | ||
| cmd_obj_builder.go | ||
| cmd_obj_runner.go | ||
| cmd_obj_runner_default.go | ||
| cmd_obj_runner_test.go | ||
| cmd_obj_runner_win.go | ||
| cmd_obj_test.go | ||
| copy.go | ||
| dummies.go | ||
| fake_cmd_obj_runner.go | ||
| gui_io.go | ||
| os.go | ||
| os_default_platform.go | ||
| os_default_test.go | ||
| os_test.go | ||
| os_windows.go | ||
| os_windows_test.go | ||