Skip to main content

bind_registration

Function bind_registration 

Source
pub fn bind_registration(
    common_dir: &Path,
    destination: &Path,
) -> Result<Bound, String>
Expand description

What: Bind an add to the directories Git just made for it, after proving that they belong together and to this repository. Why: The pointer must name an administrative directory directly below this repository’s worktrees, and that directory’s gitdir must name the pointer back; only then are the identities of both directories and the pointer bytes captured, with both directories held open. A pointer edited to name another worktree’s administrative directory fails the back-link.

In TS you’d write (pseudocode):

const bound = await bindRegistration(commonDir, destination); // throws a reason