From 963fcc1444b6ae05a689b4827837eb0a3366bf25 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Tue, 6 Apr 2021 19:00:40 +1000 Subject: [PATCH] don't kill the index.lock file until I decide whether it's actually a good idea --- pkg/commands/git.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/pkg/commands/git.go b/pkg/commands/git.go index ebf6268b4..0c15b2788 100644 --- a/pkg/commands/git.go +++ b/pkg/commands/git.go @@ -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 } } }