mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-11-21 04:46:29 +03:00
sync/lock_error_partway_through_pull_with_rebase failed on CI: every attempt to continue the rebase ran into index.lock, as if the lock was never released. The test hook that holds index.lock starts a background process that removes the lock once the git command that ran the hook has exited. If lazygit runs the command in a pty, as it does for a pull, the command's exit sends SIGHUP to that process. The process ignored SIGHUP, but only once it got to run. On a busy machine the command can exit before that; SIGHUP then kills the process and leaves the lock behind. Delaying the start of the process by 0.3s makes the test fail every time. Ignore SIGHUP in the hook before starting the background process, so that the process inherits it. With this, the test passes even with the delay. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>