Skip to main content

git_directory

Function git_directory 

Source
pub fn git_directory(identity: &WorktreeIdentity) -> Option<&Path>
Expand description

What: The Git directory of the worktree itself: its own for a linked worktree, the common one for the main worktree. Why: The worktree’s HEAD lives there, and it tells which branch the worktree has checked out.

In TS you’d write (pseudocode):

function gitDirectory(identity: WorktreeIdentity): string | undefined;