Fix the oid error introduced by the latest ObjectiveGit
This commit is contained in:
parent
3c6b80e772
commit
65e0cfdf1f
1 changed files with 5 additions and 3 deletions
|
|
@ -411,8 +411,8 @@ public class PasswordStore {
|
|||
}
|
||||
var commits = [GTCommit]()
|
||||
let enumerator = try GTEnumerator(repository: storeRepository)
|
||||
if let sha = try storeRepository.headReference().targetOID.sha {
|
||||
try enumerator.pushSHA(sha)
|
||||
if let oid = try storeRepository.headReference().targetOID {
|
||||
try enumerator.pushSHA(oid.sha)
|
||||
}
|
||||
for _ in 0 ..< count {
|
||||
let commit = try enumerator.nextObject(withSuccess: nil)
|
||||
|
|
@ -554,7 +554,9 @@ public class PasswordStore {
|
|||
let newTree = try storeRepository.index().writeTree()
|
||||
let headReference = try storeRepository.headReference()
|
||||
let commitEnum = try GTEnumerator(repository: storeRepository)
|
||||
try commitEnum.pushSHA(headReference.targetOID.sha!)
|
||||
if let oid = headReference.targetOID {
|
||||
try commitEnum.pushSHA(oid.sha)
|
||||
}
|
||||
let parent = commitEnum.nextObject() as! GTCommit
|
||||
let signature = gitSignatureForNow
|
||||
let commit = try storeRepository.createCommit(with: newTree, message: message, author: signature, committer: signature, parents: [parent], updatingReferenceNamed: headReference.name)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue