Browse Source

Prepare for v0.3.1 hotfix

Unknown 11 years ago
parent
commit
2401e68d7e
7 changed files with 5 additions and 6 deletions
  1. 1 1
      README.md
  2. 1 1
      README_ZH.md
  3. 1 1
      gogs.go
  4. BIN
      public/img/favicon.bak.png
  5. BIN
      public/img/favicon.png
  6. 1 0
      routers/repo/commit.go
  7. 1 3
      templates/repo/diff.tmpl

+ 1 - 1
README.md

@@ -5,7 +5,7 @@ Gogs(Go Git Service) is a Self Hosted Git Service in the Go Programming Language
 
 ![Demo](http://gowalker.org/public/gogs_demo.gif)
 
-##### Current version: 0.3.0 Alpha
+##### Current version: 0.3.1 Alpha
 
 ### NOTICES
 

+ 1 - 1
README_ZH.md

@@ -5,7 +5,7 @@ Gogs(Go Git Service) 是一个由 Go 语言编写的自助 Git 托管服务。
 
 ![Demo](http://gowalker.org/public/gogs_demo.gif)
 
-##### 当前版本:0.3.0 Alpha
+##### 当前版本:0.3.1 Alpha
 
 ## 开发目的
 

+ 1 - 1
gogs.go

@@ -19,7 +19,7 @@ import (
 // Test that go1.2 tag above is included in builds. main.go refers to this definition.
 const go12tag = true
 
-const APP_VER = "0.3.0.0427 Alpha"
+const APP_VER = "0.3.1.0427 Alpha"
 
 func init() {
 	base.AppVer = APP_VER

BIN
public/img/favicon.bak.png


BIN
public/img/favicon.png


+ 1 - 0
routers/repo/commit.go

@@ -97,6 +97,7 @@ func Diff(ctx *middleware.Context, params martini.Params) {
 		parents[i] = sha.String()
 		if err != nil {
 			ctx.Handle(404, "repo.Diff", err)
+			return
 		}
 	}
 

+ 1 - 3
templates/repo/diff.tmpl

@@ -8,13 +8,11 @@
                 <a class="pull-right btn btn-primary btn-sm" rel="nofollow" href="{{.SourcePath}}">Browse Source</a>
                 <h4>{{.Commit.Message}}</h4>
             </div>
-            {{ $username := .Username }}
-            {{ $reponame := .Reponame }}
             <div class="panel-body">
                 <span class="pull-right">
                 <ul class="list-unstyled">
                     {{range .Parents}}
-                    <li>parent <a href="/{{$username}}/{{$reponame}}/commit/{{.}}"><span class="label label-default sha">{{ShortSha .}}</span></a></li>
+                    <li>parent <a href="{{$.RepoLink}}/commit/{{.}}"><span class="label label-default sha">{{ShortSha .}}</span></a></li>
                     {{end}}
                     <li>commit <span class="label label-default sha">{{ShortSha .CommitId}}</span></li>
                 </ul>