reference method
Implementation
Future<Reference?> reference(ReferenceName refName) async {
var file = fs.file(p.join(dotGitDir, refName.value));
if (file.existsSync()) {
var contents = await file.readAsString();
return Reference(refName.value, contents.trimRight());
}
for (var ref in await _packedRefs()) {
if (ref.name == refName) {
return ref;
}
}
return null;
}