summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-08-15 02:06:35 -0700
committerUnknwon <u@gogs.io>2016-08-15 02:06:35 -0700
commit8637e67e6f9aa68c399a62d1180650c01069d67f (patch)
tree2bd982a1c1418d145ca236dd0bd56f6bd39c26d9
parent4a19fd64412dc111bac3c1b56cf3eb55728d2ba3 (diff)
downloadgitea-8637e67e6f9aa68c399a62d1180650c01069d67f.tar.gz
gitea-8637e67e6f9aa68c399a62d1180650c01069d67f.zip
Fix outdated edit can’t overwrite changes
-rw-r--r--README.md2
-rw-r--r--gogs.go2
-rw-r--r--modules/bindata/bindata.go4
-rw-r--r--routers/repo/editor.go3
-rw-r--r--templates/.VERSION2
5 files changed, 7 insertions, 6 deletions
diff --git a/README.md b/README.md
index 2a36e8a958..079d6b8e9d 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@ Gogs - Go Git Service [![Build Status](https://travis-ci.org/gogits/gogs.svg?bra
![](https://github.com/gogits/gogs/blob/master/public/img/gogs-large-resize.png?raw=true)
-##### Current tip version: 0.9.77 (see [Releases](https://github.com/gogits/gogs/releases) for binary versions)
+##### Current tip version: 0.9.78 (see [Releases](https://github.com/gogits/gogs/releases) for binary versions)
| Web | UI | Preview |
|:-------------:|:-------:|:-------:|
diff --git a/gogs.go b/gogs.go
index 032c37f934..8ed3184d64 100644
--- a/gogs.go
+++ b/gogs.go
@@ -17,7 +17,7 @@ import (
"github.com/gogits/gogs/modules/setting"
)
-const APP_VER = "0.9.77.0814"
+const APP_VER = "0.9.78.0815"
func init() {
runtime.GOMAXPROCS(runtime.NumCPU())
diff --git a/modules/bindata/bindata.go b/modules/bindata/bindata.go
index f0c083e579..045a0b70d5 100644
--- a/modules/bindata/bindata.go
+++ b/modules/bindata/bindata.go
@@ -301,7 +301,7 @@ func confAppIni() (*asset, error) {
return nil, err
}
- info := bindataFileInfo{name: "conf/app.ini", size: 13460, mode: os.FileMode(420), modTime: time.Unix(1471235101, 0)}
+ info := bindataFileInfo{name: "conf/app.ini", size: 13460, mode: os.FileMode(420), modTime: time.Unix(1471250630, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
@@ -4361,7 +4361,7 @@ func confLocaleLocale_enUsIni() (*asset, error) {
return nil, err
}
- info := bindataFileInfo{name: "conf/locale/locale_en-US.ini", size: 55343, mode: os.FileMode(420), modTime: time.Unix(1471240680, 0)}
+ info := bindataFileInfo{name: "conf/locale/locale_en-US.ini", size: 55343, mode: os.FileMode(420), modTime: time.Unix(1471250630, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
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, ",")
diff --git a/templates/.VERSION b/templates/.VERSION
index cfaf5e6915..289612dc43 100644
--- a/templates/.VERSION
+++ b/templates/.VERSION
@@ -1 +1 @@
-0.9.77.0814 \ No newline at end of file
+0.9.78.0815 \ No newline at end of file