From 47a7529d9655e11471bbe39958222a13854a6133 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Thu, 22 Dec 2016 17:30:52 +0800 Subject: update code.gitea.io/git (#450) --- models/repo_editor.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'models/repo_editor.go') 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, -- cgit v1.2.3