This repository was archived by the owner on Sep 11, 2020. It is now read-only.

Description
Looking through the revision.Ref case for the switch statement in ResolveRevision, the tag is resolved, however, calling r.CommitObject fails with "object not found" error because the resolved commit is not a commit Hash. Seems like one needs to call r.resolveToCommitHash either before CommitObject or inside of it (depending on the intended API)
|
for _, rule := range append([]string{"%s"}, plumbing.RefRevParseRules...) { |
|
ref, err = storer.ResolveReference(r.Storer, plumbing.ReferenceName(fmt.Sprintf(rule, revisionRef))) |
|
|
|
if err == nil { |
|
break |
|
} |
|
} |
|
|
|
if ref == nil { |
|
return &plumbing.ZeroHash, plumbing.ErrReferenceNotFound |
|
} |
|
|
|
commit, err = r.CommitObject(ref.Hash()) |
|
|
|
if err != nil { |
|
return &plumbing.ZeroHash, err |
|
} |