This repository was archived by the owner on Apr 12, 2019. It is now read-only.
File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ import (
11
11
"strings"
12
12
)
13
13
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 ) {
16
16
stdout , err := NewCommand ("show-ref" , "--verify" , name ).RunInDir (repo .Path )
17
17
if err != nil {
18
18
if strings .Contains (err .Error (), "not a valid ref" ) {
@@ -25,12 +25,12 @@ func (repo *Repository) getRefCommitID(name string) (string, error) {
25
25
26
26
// GetBranchCommitID returns last commit ID string of given branch.
27
27
func (repo * Repository ) GetBranchCommitID (name string ) (string , error ) {
28
- return repo .getRefCommitID (BranchPrefix + name )
28
+ return repo .GetRefCommitID (BranchPrefix + name )
29
29
}
30
30
31
31
// GetTagCommitID returns last commit ID string of given tag.
32
32
func (repo * Repository ) GetTagCommitID (name string ) (string , error ) {
33
- return repo .getRefCommitID (TagPrefix + name )
33
+ return repo .GetRefCommitID (TagPrefix + name )
34
34
}
35
35
36
36
// parseCommitData parses commit information from the (uncompressed) raw
You can’t perform that action at this time.
0 commit comments