From d8cf1f45c97ee8ee33dbfbfd60d2341886c16cd1 Mon Sep 17 00:00:00 2001 From: Dmitry Zhuravlev Date: Tue, 10 Mar 2026 14:57:17 +0100 Subject: [PATCH] [git]: handle exception in tags holder (IJPL-236502) (cherry picked from commit 59cdf131877ebdffe33f271e35324a97a89cbfcf) IJ-MR-195474 GitOrigin-RevId: 24816f2d97e6a2e37d7ff52f4c7ebf77598c333a --- .../src/git4idea/repo/GitRepositoryTagsHolderImpl.kt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/plugins/git4idea/src/git4idea/repo/GitRepositoryTagsHolderImpl.kt b/plugins/git4idea/src/git4idea/repo/GitRepositoryTagsHolderImpl.kt index e069ec5c2187..1f0fb6699c59 100644 --- a/plugins/git4idea/src/git4idea/repo/GitRepositoryTagsHolderImpl.kt +++ b/plugins/git4idea/src/git4idea/repo/GitRepositoryTagsHolderImpl.kt @@ -1,4 +1,4 @@ -// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2026 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package git4idea.repo import com.intellij.execution.process.ProcessOutputType @@ -47,7 +47,12 @@ internal class GitRepositoryTagsHolderImpl( init { cs.launch(Dispatchers.IO) { updateRequests.collectLatest { - _state.value = loadTagsFromGit() + try { + _state.value = loadTagsFromGit() + } + catch (e: VcsException) { + LOG.warn("Failed to load tags from Git", e) + } } }