[x] Stack trace (if provided) contains mobi.hsz.idea.gitignore package name
Description
The plugin doesn't handle git worktrees.
In a worktree, there is no ".git" subdirectory, but a ".git" file (that refers to the 'basic' checkout of the repository)
2023-06-27 16:45:24,952 [ 32193] SEVERE - #c.i.u.EditorNotificationsImpl - Expected directory instead of file: /home/me/myprojects/branch-r7.1/.git [Plugin: mobi.hsz.idea.gitignore]
com.intellij.diagnostic.PluginException: Expected directory instead of file: /home/me/myprojects/branch-r7.1/.git [Plugin: mobi.hsz.idea.gitignore]
at com.intellij.ui.EditorNotificationsImpl$updateEditors$job$1.invokeSuspend(EditorNotificationsImpl.kt:229)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
Caused by: java.io.IOException: Expected directory instead of file: /home/me/myprojects/branch-r7.1/.git
at com.intellij.openapi.vfs.VirtualFileUtil.findDirectory(VirtualFileUtil.kt:79)
at mobi.hsz.idea.gitignore.daemon.MissingGitignoreNotificationProvider.collectNotificationData(MissingGitignoreNotificationProvider.kt:77)
at com.intellij.ui.EditorNotificationsImpl$updateEditors$job$1$result$1.invoke(EditorNotificationsImpl.kt:207)
at com.intellij.ui.EditorNotificationsImpl$updateEditors$job$1$result$1.invoke(EditorNotificationsImpl.kt:204)
at com.intellij.openapi.application.rw.InternalReadAction.insideReadAction(InternalReadAction.kt:108)
at com.intellij.openapi.application.rw.InternalReadAction.access$insideReadAction(InternalReadAction.kt:15)
at com.intellij.openapi.application.rw.InternalReadAction$tryReadCancellable$1.invoke(InternalReadAction.kt:92)
at com.intellij.openapi.application.rw.InternalReadAction$tryReadCancellable$1.invoke(InternalReadAction.kt:91)
at com.intellij.openapi.progress.CancellationKt.withCurrentJob$lambda$0(cancellation.kt:17)
at com.intellij.openapi.progress.Cancellation.withCurrentJob(Cancellation.java:60)
at com.intellij.openapi.progress.CancellationKt.withCurrentJob(cancellation.kt:17)
at com.intellij.openapi.progress.CancellationKt.executeWithJobAndCompleteIt(cancellation.kt:126)
at com.intellij.openapi.application.rw.CancellableReadActionKt.cancellableReadActionInternal$lambda$1$lambda$0(cancellableReadAction.kt:49)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1102)
at com.intellij.openapi.application.rw.CancellableReadActionKt.cancellableReadActionInternal$lambda$1(cancellableReadAction.kt:47)
at com.intellij.openapi.progress.util.ProgressIndicatorUtilService.runActionAndCancelBeforeWrite(ProgressIndicatorUtilService.java:63)
at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:129)
at com.intellij.openapi.application.rw.CancellableReadActionKt.cancellableReadActionInternal(cancellableReadAction.kt:45)
at com.intellij.openapi.application.rw.InternalReadAction.tryReadCancellable(InternalReadAction.kt:91)
at com.intellij.openapi.application.rw.InternalReadAction.access$tryReadCancellable(InternalReadAction.kt:15)
at com.intellij.openapi.application.rw.InternalReadAction$tryReadAction$2.invoke(InternalReadAction.kt:77)
at com.intellij.openapi.application.rw.InternalReadAction$tryReadAction$2.invoke(InternalReadAction.kt:72)
at com.intellij.openapi.progress.CancellationKt.withCurrentJob$lambda$0(cancellation.kt:17)
at com.intellij.openapi.progress.Cancellation.withCurrentJob(Cancellation.java:60)
at com.intellij.openapi.progress.CancellationKt.withCurrentJob(cancellation.kt:17)
at com.intellij.openapi.progress.CoroutinesKt.blockingContext(coroutines.kt:193)
at com.intellij.openapi.application.rw.InternalReadAction.tryReadAction(InternalReadAction.kt:72)
at com.intellij.openapi.application.rw.InternalReadAction.readLoop(InternalReadAction.kt:64)
at com.intellij.openapi.application.rw.InternalReadAction.access$readLoop(InternalReadAction.kt:15)
at com.intellij.openapi.application.rw.InternalReadAction$runReadAction$4.invokeSuspend(InternalReadAction.kt:43)
at com.intellij.openapi.application.rw.InternalReadAction$runReadAction$4.invoke(InternalReadAction.kt)
at com.intellij.openapi.application.rw.InternalReadAction$runReadAction$4.invoke(InternalReadAction.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:169)
at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
at com.intellij.openapi.application.rw.InternalReadAction.runReadAction(InternalReadAction.kt:39)
at com.intellij.openapi.application.rw.PlatformReadActionSupport.executeReadAction(PlatformReadActionSupport.kt:29)
at com.intellij.openapi.application.ReadActionSupport.executeReadAction$default(ReadActionSupport.kt:15)
at com.intellij.openapi.application.CoroutinesKt.constrainedReadAction(coroutines.kt:55)
at com.intellij.openapi.application.CoroutinesKt.readAction(coroutines.kt:22)
at com.intellij.ui.EditorNotificationsImpl$updateEditors$job$1.invokeSuspend(EditorNotificationsImpl.kt:204)
... 6 more
Prerequisites
mobi.hsz.idea.gitignore
package nameDescription
The plugin doesn't handle git worktrees. In a worktree, there is no ".git" subdirectory, but a ".git" file (that refers to the 'basic' checkout of the repository)
Steps to Reproduce
Expected behavior:
The plugin shall handle 'git worktree' repositories.
Actual behavior:
Pluging core dumps on clion/project start
Reproduces how often:
100%
Versions
Plugin:
IDE:
OS:
Additional Information