mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-04-25 12:24:47 +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) {
|
func isDirectoryAGitRepository(dir string) (bool, error) {
|
||||||
info, err := os.Stat(filepath.Join(dir, ".git"))
|
info, err := os.Stat(filepath.Join(dir, ".git"))
|
||||||
return info != nil && info.IsDir(), err
|
return info != nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (app *App) setupRepo() (bool, error) {
|
func (app *App) setupRepo() (bool, error) {
|
||||||
|
@ -110,7 +110,7 @@ func newRecentReposList(recentRepos []string, currentRepo string) (bool, []strin
|
|||||||
newRepos := []string{currentRepo}
|
newRepos := []string{currentRepo}
|
||||||
for _, repo := range recentRepos {
|
for _, repo := range recentRepos {
|
||||||
if repo != currentRepo {
|
if repo != currentRepo {
|
||||||
if _, err := os.Stat(repo); err != nil {
|
if _, err := os.Stat(filepath.Join(repo, ".git")); err != nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
newRepos = append(newRepos, repo)
|
newRepos = append(newRepos, repo)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user