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

Function setupGitConfig

cli/pkg/gitutil/gitcmdwrapper_test.go:699–708  ·  view source on GitHub ↗

setupGitConfig sets up the git configuration for the repository at repoPath.

(t *testing.T, repoPath string)

Source from the content-addressed store, hash-verified

697
698// setupGitConfig sets up the git configuration for the repository at repoPath.
699func setupGitConfig(t *testing.T, repoPath string) {
700 // Set user name and email for the git repository
701 cmd := exec.Command("git", "-C", repoPath, "config", "user.name", "Test User")
702 err := cmd.Run()
703 require.NoError(t, err, "failed to set user name in git config")
704
705 cmd = exec.Command("git", "-C", repoPath, "config", "user.email", "test@rilldata.com")
706 err = cmd.Run()
707 require.NoError(t, err, "failed to set user email in git config")
708}
709
710// getCurrentBranch gets the current branch name for the repository at repoPath
711func getCurrentBranch(t *testing.T, repoPath string) string {

Callers 4

setupTestRepositoryFunction · 0.70
createRemoteCommitFunction · 0.70
createRemoteMergeCommitFunction · 0.70

Calls 1

RunMethod · 0.45

Tested by

no test coverage detected