mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-05 04:39:07 -04:00
feat(oid): expand short sha by looking up in ODB
This commit is contained in:
parent
747996b40c
commit
3bbcca3c75
6 changed files with 50 additions and 22 deletions
|
@ -105,9 +105,8 @@ class Index {
|
|||
oid = Oid.fromSHA(target);
|
||||
tree = Tree.lookup(bindings.owner(_indexPointer), oid.pointer);
|
||||
} else {
|
||||
final shortOid = Oid.fromSHAn(target);
|
||||
final odb = Odb(repo_bindings.odb(bindings.owner(_indexPointer)));
|
||||
oid = Oid(odb.existsPrefix(shortOid.pointer, target.length));
|
||||
oid = Oid.fromShortSHA(target, odb);
|
||||
odb.free();
|
||||
tree = Tree.lookup(bindings.owner(_indexPointer), oid.pointer);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue