1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-03-05 15:15:49 +02:00

don't kill the index.lock file until I decide whether it's actually a good idea

This commit is contained in:
Jesse Duffield 2021-04-06 19:00:40 +10:00
parent c6825e3d0d
commit 963fcc1444

View File

@ -221,14 +221,6 @@ func (c *GitCommand) RunCommandWithOutput(formatString string, formatArgs ...int
time.Sleep(waitTime)
if attempt < retryCount {
continue
} else if attempt == retryCount {
// delete the lock file because some other process must have died leaving it there
// TODO: ensure this is the actual location of the lock
c.Log.Warn("WARNING: removing index.lock file after retrying command 5 times")
if err := os.Remove(".git/index.lock"); err != nil {
return "", err
}
continue
}
}
}