resolve_main_repo_from_dot_git_file

Function resolve_main_repo_from_dot_git_file 

Source
fn resolve_main_repo_from_dot_git_file(
    dot_git_file: &Path,
) -> Result<Option<PathBuf>, Error>
Expand description

Resolve a git worktree’s .git file to find the main repository root.

In a git worktree, .git is a file containing gitdir: <path>, where <path> points to <main_repo>/.git/worktrees/<name>. Walks up the gitdir path to find the .git component and returns its parent as the main repo root.