mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
Extend submodule tests to use a submodule where name and path are different
In most real-world scenarios, name and path are usually the same. They don't have to be though, and it's important to make sure we use the right one when passing arguments to git commands, so change the tests to have different name and path.
This commit is contained in:
@ -2,7 +2,10 @@ package components
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"strings"
|
||||
|
||||
"github.com/jesseduffield/lazygit/pkg/commands/git_commands"
|
||||
)
|
||||
|
||||
type Git struct {
|
||||
@ -44,3 +47,11 @@ func (self *Git) expect(cmdArgs []string, condition func(string) (bool, string))
|
||||
|
||||
return self
|
||||
}
|
||||
|
||||
func (self *Git) Version() *git_commands.GitVersion {
|
||||
version, err := getGitVersion()
|
||||
if err != nil {
|
||||
log.Fatalf("Could not get git version: %v", err)
|
||||
}
|
||||
return version
|
||||
}
|
||||
|
Reference in New Issue
Block a user