sourcegit-scm / sourcegit

Windows/macOS/Linux GUI client for GIT users
MIT License
1.21k stars 117 forks source link

[BUG] - Can't find repo (Please remove it.) #90

Closed ennerperez closed 5 months ago

ennerperez commented 5 months ago

In the method FindRepository() instance.Repositories returns 0 even when the repo is listed:

image

And it allow to open in file browser and terminal but keep saying:

image

love-linger commented 5 months ago

Yes, it's designed that way. Items in the tree in Welcome page should NOT be auto-removed. Instead, it must stay where it should be to notice users that they have a invalid repository.

ennerperez commented 5 months ago

But it's not invalid repository, it was not deleted, I have the last release installed but when I run from source code it's detect the previous repo, but won't let me open because of this, so I have to deleted and adding again which is annoying

IDK if this is a bug in prod, or it's only because of the dual execution.

love-linger commented 5 months ago

I have reproduced this issue. Here is how I did it:

It's because Open In Terminal and Open in File Browser do NOT check repository from Preference. Instead, it use the _id field directly.

love-linger commented 5 months ago

Although it is not clear why your repositories list was emptied from Preference, the 32e685622b5373082d10f35eb13c294671c0ea08 will at least alert the user that there is something wrong with this tree node and they should remove it.

ennerperez commented 5 months ago

Still reproducible in 8.10 I just update and again I'm getting the error.

image

ennerperez commented 5 months ago

I think is not enough, I found a workaround to my problem: https://github.com/sourcegit-scm/sourcegit/pull/112