git_repository_set_workdir

Set the path to the working directory for this repository

The working directory doesn't need to be the same one that contains the .git folder for this repository.

If this repository is bare, setting its working directory will turn it into a normal repository, capable of performing all the common workdir operations (checkout, status, index manipulation, etc).

extern (C) nothrow @nogc
int
git_repository_set_workdir

Parameters

repo libgit2_d.types.git_repository*

A repository object

workdir const(char)*

The path to a working directory

Create/update gitlink in workdir and set config "core.worktree" (if workdir is not the parent of the .git directory)

Return Value

Type: int

0, or an error code

Meta