mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
do not include bare repos in recent repos list
This commit is contained in:
@ -1427,3 +1427,9 @@ func (c *GitCommand) WorkingTreeState() string {
|
||||
}
|
||||
return "normal"
|
||||
}
|
||||
|
||||
func (c *GitCommand) IsBareRepo() bool {
|
||||
// note: could use `git rev-parse --is-bare-repository` if we wanna drop go-git
|
||||
_, err := c.Repo.Worktree()
|
||||
return err == gogit.ErrIsBareRepository
|
||||
}
|
||||
|
Reference in New Issue
Block a user