aboutsummaryrefslogtreecommitdiffstats
path: root/models/repo_editor.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/repo_editor.go
parent0c5c34d7ddaf31a6d8123dac36b221de61f5ff96 (diff)
downloadgitea-47a7529d9655e11471bbe39958222a13854a6133.tar.gz
gitea-47a7529d9655e11471bbe39958222a13854a6133.zip
update code.gitea.io/git (#450)
Diffstat (limited to 'models/repo_editor.go')
-rw-r--r--models/repo_editor.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/models/repo_editor.go b/models/repo_editor.go
index b8bd46bc1d..551200b4e5 100644
--- a/models/repo_editor.go
+++ b/models/repo_editor.go
@@ -158,13 +158,13 @@ func (repo *Repository) UpdateRepoFile(doer *User, opts UpdateRepoFileOptions) (
}
oldCommitID := opts.LastCommitID
if opts.NewBranch != opts.OldBranch {
- oldCommitID = git.EMPTY_SHA
+ oldCommitID = git.EmptySHA
}
if err := CommitRepoAction(CommitRepoActionOptions{
PusherName: doer.Name,
RepoOwnerID: repo.MustOwner().ID,
RepoName: repo.Name,
- RefFullName: git.BRANCH_PREFIX + opts.NewBranch,
+ RefFullName: git.BranchPrefix + opts.NewBranch,
OldCommitID: oldCommitID,
NewCommitID: commit.ID.String(),
Commits: pushCommits,
@@ -297,7 +297,7 @@ func (repo *Repository) DeleteRepoFile(doer *User, opts DeleteRepoFileOptions) (
PusherName: doer.Name,
RepoOwnerID: repo.MustOwner().ID,
RepoName: repo.Name,
- RefFullName: git.BRANCH_PREFIX + opts.NewBranch,
+ RefFullName: git.BranchPrefix + opts.NewBranch,
OldCommitID: opts.LastCommitID,
NewCommitID: commit.ID.String(),
Commits: pushCommits,
@@ -533,7 +533,7 @@ func (repo *Repository) UploadRepoFiles(doer *User, opts UploadRepoFileOptions)
PusherName: doer.Name,
RepoOwnerID: repo.MustOwner().ID,
RepoName: repo.Name,
- RefFullName: git.BRANCH_PREFIX + opts.NewBranch,
+ RefFullName: git.BranchPrefix + opts.NewBranch,
OldCommitID: opts.LastCommitID,
NewCommitID: commit.ID.String(),
Commits: pushCommits,