Removed unnecessary conversions (#7557)
No need to convert to the same type.
This commit is contained in:
parent
2f75766532
commit
54d96c79b5
24 changed files with 39 additions and 46 deletions
|
@ -86,9 +86,9 @@ func convertPGPSignatureForTag(t *object.Tag) *CommitGPGSignature {
|
|||
func (repo *Repository) getCommit(id SHA1) (*Commit, error) {
|
||||
var tagObject *object.Tag
|
||||
|
||||
gogitCommit, err := repo.gogitRepo.CommitObject(plumbing.Hash(id))
|
||||
gogitCommit, err := repo.gogitRepo.CommitObject(id)
|
||||
if err == plumbing.ErrObjectNotFound {
|
||||
tagObject, err = repo.gogitRepo.TagObject(plumbing.Hash(id))
|
||||
tagObject, err = repo.gogitRepo.TagObject(id)
|
||||
if err == nil {
|
||||
gogitCommit, err = repo.gogitRepo.CommitObject(tagObject.Target)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue