MCPcopy
hub / github.com/git-lfs/git-lfs / TestWorktreesBareRepo

Function TestWorktreesBareRepo

git/git_test.go:461–477  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

459}
460
461func TestWorktreesBareRepo(t *testing.T) {
462 // Only git 2.5+
463 if !IsGitVersionAtLeast("2.5.0") {
464 return
465 }
466
467 repo := test.NewBareRepo(t)
468 repo.Pushd()
469 defer func() {
470 repo.Popd()
471 repo.Cleanup()
472 }()
473
474 worktrees, err := GetAllWorktrees(repo.Path)
475 assert.NoError(t, err)
476 assert.Nil(t, worktrees)
477}
478
479func TestVersionCompare(t *testing.T) {
480 assert.True(t, IsVersionAtLeast("2.6.0", "2.6.0"))

Callers

nothing calls this directly

Calls 5

IsGitVersionAtLeastFunction · 0.85
GetAllWorktreesFunction · 0.85
PushdMethod · 0.80
PopdMethod · 0.80
CleanupMethod · 0.45

Tested by

no test coverage detected