Method: Rugged::Repository#read
- Defined in:
- ext/rugged/rugged_repo.c
permalink #read(oid) ⇒ String
Read and return the raw data of the object identified by the given oid
.
1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 |
# File 'ext/rugged/rugged_repo.c', line 1151
static VALUE rb_git_repo_read(VALUE self, VALUE hex)
{
git_repository *repo;
git_oid oid;
int error;
Data_Get_Struct(self, git_repository, repo);
Check_Type(hex, T_STRING);
error = git_oid_fromstr(&oid, StringValueCStr(hex));
rugged_exception_check(error);
return rugged_raw_read(repo, &oid);
}
|