This repository was archived by the owner on Apr 12, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ import (
1111 "strings"
1212)
1313
14- // getRefCommitID returns the last commit ID string of given reference (branch or tag).
15- func (repo * Repository ) getRefCommitID (name string ) (string , error ) {
14+ // GetRefCommitID returns the last commit ID string of given reference (branch or tag).
15+ func (repo * Repository ) GetRefCommitID (name string ) (string , error ) {
1616 stdout , err := NewCommand ("show-ref" , "--verify" , name ).RunInDir (repo .Path )
1717 if err != nil {
1818 if strings .Contains (err .Error (), "not a valid ref" ) {
@@ -25,12 +25,12 @@ func (repo *Repository) getRefCommitID(name string) (string, error) {
2525
2626// GetBranchCommitID returns last commit ID string of given branch.
2727func (repo * Repository ) GetBranchCommitID (name string ) (string , error ) {
28- return repo .getRefCommitID (BranchPrefix + name )
28+ return repo .GetRefCommitID (BranchPrefix + name )
2929}
3030
3131// GetTagCommitID returns last commit ID string of given tag.
3232func (repo * Repository ) GetTagCommitID (name string ) (string , error ) {
33- return repo .getRefCommitID (TagPrefix + name )
33+ return repo .GetRefCommitID (TagPrefix + name )
3434}
3535
3636// parseCommitData parses commit information from the (uncompressed) raw
You can’t perform that action at this time.
0 commit comments