Skip to content

fix: retry on ref lock errors during fetch/pull#5161

Open
majiayu000 wants to merge 1 commit intojesseduffield:masterfrom
majiayu000:fix-5124-unable-to-update-local-ref-0102-1206
Open

fix: retry on ref lock errors during fetch/pull#5161
majiayu000 wants to merge 1 commit intojesseduffield:masterfrom
majiayu000:fix-5124-unable-to-update-local-ref-0102-1206

Conversation

@majiayu000
Copy link

Fixes #5124

Changes

  • Extended existing retry logic to handle transient ref lock errors
  • Added retry for "cannot lock ref" and "cannot update ref" error messages
  • Extracted retryable error check into helper function for clarity

These errors can occur intermittently during fetch/pull operations on large repositories and typically succeed on retry.

Extends the existing retry logic to handle transient lock-related
errors beyond just .git/index.lock. This now also retries when
encountering "cannot lock ref" or "cannot update ref" errors, which
can occur intermittently during fetch/pull operations in large
repositories.

Fixes jesseduffield#5124

Signed-off-by: majiayu000 <1835304752@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to update local ref

1 participant