Method: Rugged::Blob.from_disk
- Defined in:
- ext/rugged/rugged_blob.c
.from_disk(repository, file_path) ⇒ Object
192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 |
# File 'ext/rugged/rugged_blob.c', line 192
static VALUE rb_git_blob_from_disk(VALUE self, VALUE rb_repo, VALUE rb_path)
{
int error;
git_oid oid;
git_repository *repo;
FilePathValue(rb_path);
rugged_check_repo(rb_repo);
Data_Get_Struct(rb_repo, git_repository, repo);
error = git_blob_create_fromdisk(&oid, repo, StringValueCStr(rb_path));
rugged_exception_check(error);
return rugged_create_oid(&oid);
}
|