MCPcopy Index your code
hub / github.com/rilldata/rill / getCurrentBranch

Function getCurrentBranch

cli/pkg/gitutil/gitcmdwrapper_test.go:711–717  ·  view source on GitHub ↗

getCurrentBranch gets the current branch name for the repository at repoPath

(t *testing.T, repoPath string)

Source from the content-addressed store, hash-verified

709
710// getCurrentBranch gets the current branch name for the repository at repoPath
711func getCurrentBranch(t *testing.T, repoPath string) string {
712 t.Helper()
713 cmd := exec.Command("git", "-C", repoPath, "branch", "--show-current")
714 output, err := cmd.Output()
715 require.NoError(t, err, "failed to get current branch")
716 return strings.TrimSpace(string(output))
717}
718
719// assertFileExists checks if a file exists at the specified path relative to repoPath
720func assertFileExists(t *testing.T, repoPath, relativePath string) {

Calls

no outgoing calls

Tested by

no test coverage detected