mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-17 01:42:45 +02:00
Remove git version specific code for versions we no longer support
This commit is contained in:
@ -194,22 +194,13 @@ func TestGetRepoPaths(t *testing.T) {
|
||||
runner := oscommands.NewFakeRunner(t)
|
||||
cmd := oscommands.NewDummyCmdObjBuilder(runner)
|
||||
|
||||
version, err := GetGitVersion(oscommands.NewDummyOSCommand())
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
getRevParseArgs := func() []string {
|
||||
args := []string{"rev-parse"}
|
||||
if version.IsAtLeast(2, 31, 0) {
|
||||
args = append(args, "--path-format=absolute")
|
||||
}
|
||||
return args
|
||||
return []string{"rev-parse", "--path-format=absolute"}
|
||||
}
|
||||
// prepare the filesystem for the scenario
|
||||
s.BeforeFunc(runner, getRevParseArgs)
|
||||
|
||||
repoPaths, err := GetRepoPathsForDir("", cmd, version)
|
||||
repoPaths, err := GetRepoPathsForDir("", cmd)
|
||||
|
||||
// check the error and the paths
|
||||
if s.Err != nil {
|
||||
|
Reference in New Issue
Block a user