MCPcopy Create free account
hub / github.com/dtormoen/tsk-tsk / init

Method init

src/test_utils/git_test_utils.rs:107–116  ·  view source on GitHub ↗

Initializes a new git repository without any commits.

(&self)

Source from the content-addressed store, hash-verified

105
106 /// Initializes a new git repository without any commits.
107 pub fn init(&self) -> Result<()> {
108 self.run_git_command(&["init"])
109 .context("Failed to initialize git repository")?;
110
111 // Set local git config to avoid using global config
112 self.run_git_command(&["config", "user.email", "test@example.com"])?;
113 self.run_git_command(&["config", "user.name", "Test User"])?;
114
115 Ok(())
116 }
117
118 /// Initializes a new git repository with an initial commit.
119 /// Returns the commit SHA of the initial commit.

Calls 1

run_git_commandMethod · 0.80

Tested by

no test coverage detected