mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-04-13 11:50:28 +02:00
Worktrees should not be filtered out
But non-git directories should
This commit is contained in:
parent
c26650258d
commit
9c6239df3d
@ -148,7 +148,7 @@ func isGitVersionValid(versionStr string) bool {
|
||||
|
||||
func isDirectoryAGitRepository(dir string) (bool, error) {
|
||||
info, err := os.Stat(filepath.Join(dir, ".git"))
|
||||
return info != nil && info.IsDir(), err
|
||||
return info != nil, err
|
||||
}
|
||||
|
||||
func (app *App) setupRepo() (bool, error) {
|
||||
|
@ -110,7 +110,7 @@ func newRecentReposList(recentRepos []string, currentRepo string) (bool, []strin
|
||||
newRepos := []string{currentRepo}
|
||||
for _, repo := range recentRepos {
|
||||
if repo != currentRepo {
|
||||
if _, err := os.Stat(repo); err != nil {
|
||||
if _, err := os.Stat(filepath.Join(repo, ".git")); err != nil {
|
||||
continue
|
||||
}
|
||||
newRepos = append(newRepos, repo)
|
||||
|
Loading…
x
Reference in New Issue
Block a user