diff options
Diffstat (limited to 'routers/repo/editor.go')
-rw-r--r-- | routers/repo/editor.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/routers/repo/editor.go b/routers/repo/editor.go index 71fb040f9a..ed1e9a1360 100644 --- a/routers/repo/editor.go +++ b/routers/repo/editor.go @@ -129,6 +129,7 @@ func editFilePost(ctx *context.Context, form auth.EditRepoFileForm, isNewFile bo content := form.Content commitChoice := form.CommitChoice lastCommit := form.LastCommit + form.LastCommit = ctx.Repo.Commit.ID.String() if commitChoice == "commit-to-new-branch" { branchName = form.NewBranchName @@ -151,7 +152,7 @@ func editFilePost(ctx *context.Context, form auth.EditRepoFileForm, isNewFile bo ctx.Data["commit_message"] = form.CommitMessage ctx.Data["commit_choice"] = commitChoice ctx.Data["new_branch_name"] = branchName - ctx.Data["last_commit"] = ctx.Repo.Commit.ID + ctx.Data["last_commit"] = form.LastCommit ctx.Data["MarkdownFileExts"] = strings.Join(setting.Markdown.FileExtensions, ",") ctx.Data["LineWrapExtensions"] = strings.Join(setting.Repository.Editor.LineWrapExtensions, ",") ctx.Data["PreviewableFileModes"] = strings.Join(setting.Repository.Editor.PreviewableFileModes, ",") |