mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-12 23:41:54 +03:00
Centralise logic for obtaining repo paths
There are quite a few paths you might want to get e.g. the repo's path, the worktree's path, the repo's git dir path, the worktree's git dir path. I want these all obtained once and then used when needed rather than having to have IO whenever we need them. This is not so much about reducing time spent on IO as it is about not having to care about errors every time we want a path.
This commit is contained in:
@ -19,7 +19,7 @@ func NewBisectCommands(gitCommon *GitCommon) *BisectCommands {
|
||||
// This command is pretty cheap to run so we're not storing the result anywhere.
|
||||
// But if it becomes problematic we can chang that.
|
||||
func (self *BisectCommands) GetInfo() *BisectInfo {
|
||||
return self.GetInfoForGitDir(self.dotGitDir)
|
||||
return self.GetInfoForGitDir(self.repoPaths.WorktreeGitDirPath())
|
||||
}
|
||||
|
||||
func (self *BisectCommands) GetInfoForGitDir(gitDir string) *BisectInfo {
|
||||
|
Reference in New Issue
Block a user