Skip to main content

PREFIX_OPTION

Constant PREFIX_OPTION 

Source
pub const PREFIX_OPTION: &str = "--show-prefix";
Expand description

What: The rev-parse option that prints the path from the worktree top level to the directory the command runs in. &str is borrowed text baked into the program. Why: Git prints an empty line at the top level, so “is the command run from the root” is Git’s own answer, with every -C and symbolic link already applied.

In TS you’d write (pseudocode):

const PREFIX_OPTION = '--show-prefix';