diff options
author | Lauris BH <lauris@nix.lv> | 2018-01-19 08:18:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-19 08:18:51 +0200 |
commit | ca306985d35f295fb2a2f8a54661731462426281 (patch) | |
tree | c63ec4474aecd21a39fd0b7aeac34df602f92311 /vendor/code.gitea.io | |
parent | b0d5bb909b2e558bee5d4d58f201012d5f8b4c1c (diff) | |
download | gitea-ca306985d35f295fb2a2f8a54661731462426281.tar.gz gitea-ca306985d35f295fb2a2f8a54661731462426281.zip |
Change how merged PR commit info are prepared (#3368)
* Change how merged PR commits and diff are made
* Update code.gitea.io/git dependency
* Fix typo
* Remove unneeded local variable
Diffstat (limited to 'vendor/code.gitea.io')
-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 |