Commit 185cebe9 authored by tyler wanek's avatar tyler wanek

Address PR concerns

parent 37f34b56
......@@ -85,7 +85,7 @@ void GitRemote::ReferenceListWorker::HandleOKCallback()
}
else if (baton->error_code < 0)
{
Local<v8::Object> err = Nan::Error("Method next has thrown an error.")->ToObject();
Local<v8::Object> err = Nan::Error("Reference List has thrown an error.")->ToObject();
err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code));
Local<v8::Value> argv[1] = {
err
......
......@@ -26,7 +26,10 @@ git_remote_head *git_remote_head_dup(const git_remote_head *src) {
dest->local = src->local;
git_oid_cpy(&dest->oid, &src->oid);
git_oid_cpy(&dest->loid, &src->loid);
dest->name = strdup(src->name);
dest->name = src->name
? strdup(src->name)
: NULL;
dest->symref_target = src->symref_target
? strdup(src->symref_target)
: NULL;
......
......@@ -113,11 +113,14 @@ Remote.prototype.push = function(refSpecs, opts) {
};
/**
* Lists advertised references from a remote
* Lists advertised references from a remote. You must connect to the remote
* before using referenceList.
*
* @async
* @return {Promise<Array<RemoteHead>>} a list of the remote heads currently
* available on the remote for download
* @return {Promise<Array<RemoteHead>>} a list of the remote heads the remote
* had available at the last established
* connection.
*
*/
Remote.prototype.referenceList = Remote.prototype.referenceList;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment