mirror of
https://github.com/go-gitea/gitea.git
synced 2025-11-13 02:02:53 +09:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
12f51ec7dd | ||
|
|
82b843a5ab | ||
|
|
dcbbf37082 | ||
|
|
3e8618a543 | ||
|
|
3a2679db2e |
14
CHANGELOG.md
14
CHANGELOG.md
@@ -4,6 +4,20 @@ This changelog goes through all the changes that have been made in each release
|
|||||||
without substantial changes to our git log; to see the highlights of what has
|
without substantial changes to our git log; to see the highlights of what has
|
||||||
been added to each release, please refer to the [blog](https://blog.gitea.io).
|
been added to each release, please refer to the [blog](https://blog.gitea.io).
|
||||||
|
|
||||||
|
## [1.12.1](https://github.com/go-gitea/gitea/releases/tag/v1.12.1) - 2020-06-21
|
||||||
|
|
||||||
|
* BUGFIXES
|
||||||
|
* Handle multiple merges in gitgraph.js (#11996) (#12000)
|
||||||
|
* Add serviceworker.js to KnownPublicEntries (#11992) (#11994)
|
||||||
|
* For language detection do not try to analyze big files by content (#11971) (#11975)
|
||||||
|
* ENHANCEMENTS
|
||||||
|
* Fix scrollable header on dropdowns (#11893) (#11965)
|
||||||
|
|
||||||
|
## [1.11.8](https://github.com/go-gitea/gitea/releases/tag/v1.11.8) - 2020-06-21
|
||||||
|
|
||||||
|
* BUGFIXES
|
||||||
|
* Really fix __webpack_public_path__ for 1.11 (#11961)
|
||||||
|
|
||||||
## [1.12.0](https://github.com/go-gitea/gitea/releases/tag/v1.12.0) - 2020-06-17
|
## [1.12.0](https://github.com/go-gitea/gitea/releases/tag/v1.12.0) - 2020-06-17
|
||||||
|
|
||||||
* BREAKING
|
* BREAKING
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ import (
|
|||||||
"code.gitea.io/gitea/modules/generate"
|
"code.gitea.io/gitea/modules/generate"
|
||||||
"code.gitea.io/gitea/modules/git"
|
"code.gitea.io/gitea/modules/git"
|
||||||
"code.gitea.io/gitea/modules/log"
|
"code.gitea.io/gitea/modules/log"
|
||||||
|
"code.gitea.io/gitea/modules/public"
|
||||||
"code.gitea.io/gitea/modules/setting"
|
"code.gitea.io/gitea/modules/setting"
|
||||||
"code.gitea.io/gitea/modules/structs"
|
"code.gitea.io/gitea/modules/structs"
|
||||||
api "code.gitea.io/gitea/modules/structs"
|
api "code.gitea.io/gitea/modules/structs"
|
||||||
@@ -878,7 +879,7 @@ func (u *User) IsGhost() bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
reservedUsernames = []string{
|
reservedUsernames = append([]string{
|
||||||
".",
|
".",
|
||||||
"..",
|
"..",
|
||||||
".well-known",
|
".well-known",
|
||||||
@@ -888,17 +889,13 @@ var (
|
|||||||
"attachments",
|
"attachments",
|
||||||
"avatars",
|
"avatars",
|
||||||
"commits",
|
"commits",
|
||||||
"css",
|
|
||||||
"debug",
|
"debug",
|
||||||
"error",
|
"error",
|
||||||
"explore",
|
"explore",
|
||||||
"fomantic",
|
|
||||||
"ghost",
|
"ghost",
|
||||||
"help",
|
"help",
|
||||||
"img",
|
|
||||||
"install",
|
"install",
|
||||||
"issues",
|
"issues",
|
||||||
"js",
|
|
||||||
"less",
|
"less",
|
||||||
"login",
|
"login",
|
||||||
"manifest.json",
|
"manifest.json",
|
||||||
@@ -916,8 +913,8 @@ var (
|
|||||||
"stars",
|
"stars",
|
||||||
"template",
|
"template",
|
||||||
"user",
|
"user",
|
||||||
"vendor",
|
}, public.KnownPublicEntries...)
|
||||||
}
|
|
||||||
reservedUserPatterns = []string{"*.keys", "*.gpg"}
|
reservedUserPatterns = []string{"*.keys", "*.gpg"}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,8 @@ import (
|
|||||||
"github.com/go-git/go-git/v5/plumbing/object"
|
"github.com/go-git/go-git/v5/plumbing/object"
|
||||||
)
|
)
|
||||||
|
|
||||||
const fileSizeLimit int64 = 16 * 1024 * 1024
|
const fileSizeLimit int64 = 16 * 1024 // 16 KiB
|
||||||
|
const bigFileSize int64 = 1024 * 1024 // 1 MiB
|
||||||
|
|
||||||
// specialLanguages defines list of languages that are excluded from the calculation
|
// specialLanguages defines list of languages that are excluded from the calculation
|
||||||
// unless they are the only language present in repository. Only languages which under
|
// unless they are the only language present in repository. Only languages which under
|
||||||
@@ -62,8 +63,11 @@ func (repo *Repository) GetLanguageStats(commitID string) (map[string]int64, err
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// If content can not be read just do detection by filename
|
// If content can not be read or file is too big just do detection by filename
|
||||||
content, _ := readFile(f, fileSizeLimit)
|
var content []byte
|
||||||
|
if f.Size <= bigFileSize {
|
||||||
|
content, _ = readFile(f, fileSizeLimit)
|
||||||
|
}
|
||||||
if enry.IsGenerated(f.Name, content) {
|
if enry.IsGenerated(f.Name, content) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,12 +30,13 @@ type Options struct {
|
|||||||
Prefix string
|
Prefix string
|
||||||
}
|
}
|
||||||
|
|
||||||
// List of known entries inside the `public` directory
|
// KnownPublicEntries list all direct children in the `public` directory
|
||||||
var knownEntries = []string{
|
var KnownPublicEntries = []string{
|
||||||
"css",
|
"css",
|
||||||
"fomantic",
|
"fomantic",
|
||||||
"img",
|
"img",
|
||||||
"js",
|
"js",
|
||||||
|
"serviceworker.js",
|
||||||
"vendor",
|
"vendor",
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -114,7 +115,7 @@ func (opts *Options) handle(ctx *macaron.Context, log *log.Logger, opt *Options)
|
|||||||
if len(parts) < 2 {
|
if len(parts) < 2 {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
for _, entry := range knownEntries {
|
for _, entry := range KnownPublicEntries {
|
||||||
if entry == parts[1] {
|
if entry == parts[1] {
|
||||||
ctx.Resp.WriteHeader(404)
|
ctx.Resp.WriteHeader(404)
|
||||||
return true
|
return true
|
||||||
|
|||||||
@@ -2,39 +2,37 @@
|
|||||||
<div class="repository commits">
|
<div class="repository commits">
|
||||||
{{template "repo/header" .}}
|
{{template "repo/header" .}}
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div id="git-graph-container" class="ui segment">
|
<div id="git-graph-container" class="ui segment">
|
||||||
<h1>{{.i18n.Tr "repo.commit_graph"}}</h1>
|
<h1>{{.i18n.Tr "repo.commit_graph"}}</h1>
|
||||||
<div id="rel-container">
|
<div id="rel-container">
|
||||||
<canvas id="graph-canvas">
|
<canvas id="graph-canvas">
|
||||||
<ul id="graph-raw-list">
|
<ul id="graph-raw-list">
|
||||||
{{ range .Graph }}
|
{{ range .Graph }}
|
||||||
<li><span class="node-relation">{{ .GraphAcii -}}</span></li>
|
<li><span class="node-relation">{{ .GraphAcii -}}</span></li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
</ul>
|
||||||
</canvas>
|
</canvas>
|
||||||
</div>
|
</div>
|
||||||
<div id="rev-container">
|
<div id="rev-container">
|
||||||
<ul id="rev-list">
|
<ul id="rev-list">
|
||||||
{{ range .Graph }}
|
{{ range .Graph }}
|
||||||
<li>
|
<li>
|
||||||
{{ if .OnlyRelation }}
|
{{ if .OnlyRelation }}
|
||||||
<span />
|
<span />
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<code id="{{.ShortRev}}">
|
<code id="{{.ShortRev}}">
|
||||||
<a href="{{AppSubUrl}}/{{$.Username}}/{{$.Reponame}}/commit/{{.Rev}}">{{ .ShortRev}}</a>
|
<a href="{{AppSubUrl}}/{{$.Username}}/{{$.Reponame}}/commit/{{.Rev}}">{{ .ShortRev}}</a>
|
||||||
</code>
|
</code>
|
||||||
<strong> {{.Branch}}</strong>
|
<strong> {{.Branch}}</strong>
|
||||||
<span>{{RenderCommitMessage .Subject $.RepoLink $.Repository.ComposeMetas}}</span> by
|
<span>{{RenderCommitMessage .Subject $.RepoLink $.Repository.ComposeMetas}}</span> by
|
||||||
<span class="author">
|
<span class="author">{{.Author}}</span>
|
||||||
{{.Author}}
|
<span class="time">{{.Date}}</span>
|
||||||
</span>
|
{{ end }}
|
||||||
<span class="time">{{.Date}}</span>
|
</li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</li>
|
</ul>
|
||||||
{{ end }}
|
</div>
|
||||||
</ul>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{template "base/paginate" .}}
|
{{template "base/paginate" .}}
|
||||||
|
|||||||
15
web_src/js/vendor/gitgraph.js
vendored
15
web_src/js/vendor/gitgraph.js
vendored
@@ -65,7 +65,7 @@ export default function gitGraph(canvas, rawGraphList, config) {
|
|||||||
|
|
||||||
for (i = 0; i < l; i++) {
|
for (i = 0; i < l; i++) {
|
||||||
midStr = rawGraphList[i].replace(/\s+/g, ' ').replace(/^\s+|\s+$/g, '');
|
midStr = rawGraphList[i].replace(/\s+/g, ' ').replace(/^\s+|\s+$/g, '');
|
||||||
|
midStr = midStr.replace(/(--)|(-\.)/g,'-')
|
||||||
maxWidth = Math.max(midStr.replace(/(_|\s)/g, '').length, maxWidth);
|
maxWidth = Math.max(midStr.replace(/(_|\s)/g, '').length, maxWidth);
|
||||||
|
|
||||||
row = midStr.split('');
|
row = midStr.split('');
|
||||||
@@ -343,11 +343,6 @@ export default function gitGraph(canvas, rawGraphList, config) {
|
|||||||
return (val !== ' ' && val !== '_');
|
return (val !== ' ' && val !== '_');
|
||||||
}).length;
|
}).length;
|
||||||
|
|
||||||
// do some clean up
|
|
||||||
if (flows.length > condenseCurrentLength) {
|
|
||||||
flows.splice(condenseCurrentLength, flows.length - condenseCurrentLength);
|
|
||||||
}
|
|
||||||
|
|
||||||
colomnIndex = 0;
|
colomnIndex = 0;
|
||||||
|
|
||||||
// a little inline analysis and draw process
|
// a little inline analysis and draw process
|
||||||
@@ -362,7 +357,7 @@ export default function gitGraph(canvas, rawGraphList, config) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// inline interset
|
// inline intersect
|
||||||
if ((colomn === '_' || colomn === '/')
|
if ((colomn === '_' || colomn === '/')
|
||||||
&& currentRow[colomnIndex - 1] === '|'
|
&& currentRow[colomnIndex - 1] === '|'
|
||||||
&& currentRow[colomnIndex - 2] === '_') {
|
&& currentRow[colomnIndex - 2] === '_') {
|
||||||
@@ -380,6 +375,7 @@ export default function gitGraph(canvas, rawGraphList, config) {
|
|||||||
color = flows[colomnIndex].color;
|
color = flows[colomnIndex].color;
|
||||||
|
|
||||||
switch (colomn) {
|
switch (colomn) {
|
||||||
|
case '-':
|
||||||
case '_':
|
case '_':
|
||||||
drawLineRight(x, y, color);
|
drawLineRight(x, y, color);
|
||||||
|
|
||||||
@@ -416,6 +412,11 @@ export default function gitGraph(canvas, rawGraphList, config) {
|
|||||||
|
|
||||||
y -= config.unitSize;
|
y -= config.unitSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// do some clean up
|
||||||
|
if (flows.length > condenseCurrentLength) {
|
||||||
|
flows.splice(condenseCurrentLength, flows.length - condenseCurrentLength);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
init();
|
init();
|
||||||
|
|||||||
@@ -1245,7 +1245,7 @@ i.icon.centerlock {
|
|||||||
|
|
||||||
/* limit width of all direct dropdown menu children */
|
/* limit width of all direct dropdown menu children */
|
||||||
/* https://github.com/go-gitea/gitea/pull/10835 */
|
/* https://github.com/go-gitea/gitea/pull/10835 */
|
||||||
.dropdown:not(.selection) > .menu:not(.review-box) > * {
|
.dropdown:not(.selection) > .menu:not(.review-box) > *:not(.header) {
|
||||||
max-width: 300px;
|
max-width: 300px;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
|||||||
Reference in New Issue
Block a user