Skip to main content

instance_of

Function instance_of 

Source
pub fn instance_of(git_dir: &Path) -> String
Expand description

What: The instance name of a worktree: 32 hexadecimal digits of the FNV-1a hash of its real Git directory path. Why: The real path makes two spellings of one directory (a link, a relative part) one instance. A directory that cannot be resolved is hashed as given.

In TS you’d write (pseudocode):

instanceOf(gitDir) // '3f9a...' (32 digits)