summaryrefslogtreecommitdiffstats
path: root/models/action.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2016-12-22 17:30:52 +0800
committerThomas Boerger <thomas@webhippie.de>2016-12-22 10:30:52 +0100
commit47a7529d9655e11471bbe39958222a13854a6133 (patch)
tree98e597255245e17d39a0062c3977fb8a510cf413 /models/action.go
parent0c5c34d7ddaf31a6d8123dac36b221de61f5ff96 (diff)
downloadgitea-47a7529d9655e11471bbe39958222a13854a6133.tar.gz
gitea-47a7529d9655e11471bbe39958222a13854a6133.zip
update code.gitea.io/git (#450)
Diffstat (limited to 'models/action.go')
-rw-r--r--models/action.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/models/action.go b/models/action.go
index e9a0fcdd11..e14dc062fe 100644
--- a/models/action.go
+++ b/models/action.go
@@ -494,12 +494,12 @@ func CommitRepoAction(opts CommitRepoActionOptions) error {
isNewBranch := false
opType := ActionCommitRepo
// Check it's tag push or branch.
- if strings.HasPrefix(opts.RefFullName, git.TAG_PREFIX) {
+ if strings.HasPrefix(opts.RefFullName, git.TagPrefix) {
opType = ActionPushTag
opts.Commits = &PushCommits{}
} else {
// if not the first commit, set the compare URL.
- if opts.OldCommitID == git.EMPTY_SHA {
+ if opts.OldCommitID == git.EmptySHA {
isNewBranch = true
} else {
opts.Commits.CompareURL = repo.ComposeCompareURL(opts.OldCommitID, opts.NewCommitID)