MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / is_git_repo

Function is_git_repo

crates/opencode-server/src/worktree.rs:40–42  ·  view source on GitHub ↗
(path: &Path)

Source from the content-addressed store, hash-verified

38}
39
40fn is_git_repo(path: &Path) -> bool {
41 path.join(".git").exists() || run_git(&["rev-parse", "--git-dir"], path).is_ok()
42}
43
44pub fn list_worktrees(repo_path: &Path) -> Result<Vec<WorktreeInfo>, WorktreeError> {
45 if !is_git_repo(repo_path) {

Callers 4

list_worktreesFunction · 0.85
create_worktreeFunction · 0.85
remove_worktreeFunction · 0.85
prune_worktreesFunction · 0.85

Calls 2

run_gitFunction · 0.85
existsMethod · 0.80

Tested by

no test coverage detected