summaryrefslogtreecommitdiffstats
path: root/models/update.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/update.go
parent0c5c34d7ddaf31a6d8123dac36b221de61f5ff96 (diff)
downloadgitea-47a7529d9655e11471bbe39958222a13854a6133.tar.gz
gitea-47a7529d9655e11471bbe39958222a13854a6133.zip
update code.gitea.io/git (#450)
Diffstat (limited to 'models/update.go')
-rw-r--r--models/update.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/models/update.go b/models/update.go
index 39d4f7e3b6..690bc6b329 100644
--- a/models/update.go
+++ b/models/update.go
@@ -91,10 +91,10 @@ type PushUpdateOptions struct {
// PushUpdate must be called for any push actions in order to
// generates necessary push action history feeds.
func PushUpdate(opts PushUpdateOptions) (err error) {
- isNewRef := opts.OldCommitID == git.EMPTY_SHA
- isDelRef := opts.NewCommitID == git.EMPTY_SHA
+ isNewRef := opts.OldCommitID == git.EmptySHA
+ isDelRef := opts.NewCommitID == git.EmptySHA
if isNewRef && isDelRef {
- return fmt.Errorf("Old and new revisions are both %s", git.EMPTY_SHA)
+ return fmt.Errorf("Old and new revisions are both %s", git.EmptySHA)
}
repoPath := RepoPath(opts.RepoUserName, opts.RepoName)
@@ -127,7 +127,7 @@ func PushUpdate(opts PushUpdateOptions) (err error) {
}
// Push tags.
- if strings.HasPrefix(opts.RefFullName, git.TAG_PREFIX) {
+ if strings.HasPrefix(opts.RefFullName, git.TagPrefix) {
if err := CommitRepoAction(CommitRepoActionOptions{
PusherName: opts.PusherName,
RepoOwnerID: owner.ID,