diff options
Diffstat (limited to 'vendor/code.gitea.io/git/repo_commit.go')
-rw-r--r-- | vendor/code.gitea.io/git/repo_commit.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/vendor/code.gitea.io/git/repo_commit.go b/vendor/code.gitea.io/git/repo_commit.go index 44ad8450fd..56bebd7a3a 100644 --- a/vendor/code.gitea.io/git/repo_commit.go +++ b/vendor/code.gitea.io/git/repo_commit.go @@ -11,8 +11,8 @@ import ( "strings" ) -// getRefCommitID returns the last commit ID string of given reference (branch or tag). -func (repo *Repository) getRefCommitID(name string) (string, error) { +// GetRefCommitID returns the last commit ID string of given reference (branch or tag). +func (repo *Repository) GetRefCommitID(name string) (string, error) { stdout, err := NewCommand("show-ref", "--verify", name).RunInDir(repo.Path) if err != nil { if strings.Contains(err.Error(), "not a valid ref") { @@ -25,12 +25,12 @@ func (repo *Repository) getRefCommitID(name string) (string, error) { // GetBranchCommitID returns last commit ID string of given branch. func (repo *Repository) GetBranchCommitID(name string) (string, error) { - return repo.getRefCommitID(BranchPrefix + name) + return repo.GetRefCommitID(BranchPrefix + name) } // GetTagCommitID returns last commit ID string of given tag. func (repo *Repository) GetTagCommitID(name string) (string, error) { - return repo.getRefCommitID(TagPrefix + name) + return repo.GetRefCommitID(TagPrefix + name) } // parseCommitData parses commit information from the (uncompressed) raw |