Method: Rugged::Repository#workdir=
- Defined in:
- ext/rugged/rugged_repo.c
permalink #workdir=(path) ⇒ Object
Sets the working directory of repo
to path
. All internal operations on repo
that affect the working directory will instead use path
.
The workdir
can be set on bare repositories to temporarily turn them into normal repositories.
repo. #=> true
repo.workdir = "/tmp/workdir"
repo. #=> false
repo.checkout
1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 |
# File 'ext/rugged/rugged_repo.c', line 1594
static VALUE rb_git_repo_set_workdir(VALUE self, VALUE rb_workdir)
{
git_repository *repo;
Data_Get_Struct(self, git_repository, repo);
Check_Type(rb_workdir, T_STRING);
rugged_exception_check(
git_repository_set_workdir(repo, StringValueCStr(rb_workdir), 0)
);
return Qnil;
}
|