]> source.dussan.org Git - gitea.git/commitdiff
Use commit summaries instead of full messages
authorChris Lee <clee@mg8.org>
Sun, 27 Apr 2014 06:46:03 +0000 (06:46 +0000)
committerChris Lee <clee@mg8.org>
Sun, 27 Apr 2014 06:46:03 +0000 (06:46 +0000)
routers/repo/commit.go
templates/repo/commits.tmpl
templates/repo/single_list.tmpl

index 6e20a7b7f47c8c0a732a554957d4701632855948..9ecc697d2775f13541f2593a15db708ad399467f 100644 (file)
@@ -92,7 +92,7 @@ func Diff(ctx *middleware.Context, params martini.Params) {
        }
 
        ctx.Data["IsImageFile"] = isImageFile
-       ctx.Data["Title"] = commit.Message() + " · " + base.ShortSha(commitId)
+       ctx.Data["Title"] = commit.Summary() + " · " + base.ShortSha(commitId)
        ctx.Data["Commit"] = commit
        ctx.Data["Diff"] = diff
        ctx.Data["DiffNotAvailable"] = diff.NumFiles() == 0
index b14c6bc8c65128f2a7c0ec67397a35a2f5a8cc27..cf665b6b705294dfe045001d5c512248eb3650b5 100644 (file)
@@ -33,7 +33,7 @@
                 <tr>
                     <td class="author"><img class="avatar" src="{{AvatarLink .Author.Email}}" alt=""/><a href="/user/email2user?email={{.Author.Email}}">{{.Author.Name}}</a></td>
                     <td class="sha"><a rel="nofollow" class="label label-success" href="/{{$username}}/{{$reponame}}/commit/{{.Id}} ">{{SubStr .Id.String 0 10}} </a></td>
-                    <td class="message">{{.Message}} </td>
+                    <td class="message">{{.Summary}} </td>
                     <td class="date">{{TimeSince .Author.When}}</td>
                 </tr>
                 {{end}}
index 7b6c6e5e9c1b95ed466f3dda01f7480dcf95ffe0..9c157d1b19a56b2ed8bfef9148f4ef7dc6ec6494 100644 (file)
@@ -1,6 +1,6 @@
 <div class="panel panel-default info-box">
     <div class="panel-heading info-head">
-        <a href="/{{.Username}}/{{.Reponame}}/commit/{{.LastCommit.Id}}">{{.LastCommit.Message}}</a>
+        <a href="/{{.Username}}/{{.Reponame}}/commit/{{.LastCommit.Id}}">{{.LastCommit.Summary}}</a>
     </div>
     <div class="panel-body info-content">
         <a href="/user/{{.LastCommit.Author.Name}}">{{.LastCommit.Author.Name}}</a> <span class="text-muted">{{TimeSince .LastCommit.Author.When}}</span>
@@ -36,7 +36,7 @@
                         </span>
                     </td>
                     <td class="text">
-                        <span class="wrap"><a rel="nofollow" href="/{{$.Username}}/{{$.Reponame}}/commit/{{$commit.Id}}">{{$commit.Message}}</a></span>
+                        <span class="wrap"><a rel="nofollow" href="/{{$.Username}}/{{$.Reponame}}/commit/{{$commit.Id}}">{{$commit.Summary}}</a></span>
                     </td>
                     <td class="date">
                         <span class="wrap">{{TimeSince $commit.Committer.When}}</span>