Method: Rugged::Repository#head=

Defined in:
ext/rugged/rugged_repo.c

#head=(str) ⇒ Object

Make the repository’s HEAD point to the specified reference.


1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
# File 'ext/rugged/rugged_repo.c', line 1495

static VALUE rb_git_repo_set_head(VALUE self, VALUE rb_head)
{
	git_repository *repo;
	int error;

	Data_Get_Struct(self, git_repository, repo);

	Check_Type(rb_head, T_STRING);
	error = git_repository_set_head(repo, StringValueCStr(rb_head));
	rugged_exception_check(error);

	return Qnil;
}