diff options
Diffstat (limited to 'models/repo_editor.go')
-rw-r--r-- | models/repo_editor.go | 8 |
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, |