Method: Rugged::Repository#default_notes_ref
- Defined in:
- ext/rugged/rugged_note.c
#notes_default_ref ⇒ String
Get the default notes reference for a repository
:
Returns a new String object.
repo.default_notes_ref #=> "refs/notes/commits"
331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 |
# File 'ext/rugged/rugged_note.c', line 331
static VALUE rb_git_note_default_ref_GET(VALUE self)
{
git_repository *repo = NULL;
git_buf ref_name = { 0 };
VALUE rb_result;
Data_Get_Struct(self, git_repository, repo);
rugged_exception_check(
git_note_default_ref(&ref_name, repo)
);
rb_result = rb_enc_str_new(ref_name.ptr, ref_name.size, rb_utf8_encoding());
git_buf_dispose(&ref_name);
return rb_result;
}
|