Skip to content

Commit 7667437

Browse files
committed
Merge remote-tracking branch 'giteaofficial/main'
* giteaofficial/main: Fix panic in EscapeReader (go-gitea#18820) Put buttons back in org dashboard (go-gitea#18817) Generate coverage with sqlite. (go-gitea#18813) Update on-cloud-provider.md (go-gitea#18807)
2 parents 385b697 + 4b3ebda commit 7667437

File tree

5 files changed

+32
-0
lines changed

5 files changed

+32
-0
lines changed

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,10 @@ bench-pgsql: integrations.pgsql.test generate-ini-pgsql
514514
integration-test-coverage: integrations.cover.test generate-ini-mysql
515515
GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mysql.ini ./integrations.cover.test -test.coverprofile=integration.coverage.out
516516

517+
.PHONY: integration-test-coverage-sqlite
518+
integration-test-coverage-sqlite: integrations.cover.sqlite.test generate-ini-sqlite
519+
GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/sqlite.ini ./integrations.cover.sqlite.test -test.coverprofile=integration.coverage.out
520+
517521
integrations.mysql.test: git-check $(GO_SOURCES)
518522
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/integrations -o integrations.mysql.test
519523

@@ -532,6 +536,9 @@ integrations.sqlite.test: git-check $(GO_SOURCES)
532536
integrations.cover.test: git-check $(GO_SOURCES)
533537
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/integrations -coverpkg $(shell echo $(GO_PACKAGES) | tr ' ' ',') -o integrations.cover.test
534538

539+
integrations.cover.sqlite.test: git-check $(GO_SOURCES)
540+
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/integrations -coverpkg $(shell echo $(GO_PACKAGES) | tr ' ' ',') -o integrations.cover.sqlite.test -tags '$(TEST_TAGS)'
541+
535542
.PHONY: migrations.mysql.test
536543
migrations.mysql.test: $(GO_SOURCES)
537544
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/integrations/migration-test -o migrations.mysql.test

docs/content/doc/installation/on-cloud-provider.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,9 @@ To deploy Gitea to DigitalOcean, have a look at the [DigitalOcean Marketplace](h
4848
[Linode](https://www.linode.com/) has Gitea as an app in their marketplace.
4949

5050
To deploy Gitea to Linode, have a look at the [Linode Marketplace](https://www.linode.com/marketplace/apps/linode/gitea/).
51+
52+
## alwaysdata
53+
54+
[alwaysdata](https://www.alwaysdata.com/) has Gitea as an app in their marketplace.
55+
56+
To deploy Gitea to alwaysdata, have a look at the [alwaysdata Marketplace](https://www.alwaysdata.com/en/marketplace/gitea/).

modules/charset/escape.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ readingloop:
7474
for err == nil {
7575
n, err = text.Read(buf[readStart:])
7676
bs := buf[:n+readStart]
77+
n = len(bs)
7778
i := 0
7879

7980
for i < len(bs) {

modules/charset/escape_test.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,3 +200,12 @@ func TestEscapeControlReader(t *testing.T) {
200200
})
201201
}
202202
}
203+
204+
func TestEscapeControlReader_panic(t *testing.T) {
205+
bs := make([]byte, 0, 20479)
206+
bs = append(bs, 'A')
207+
for i := 0; i < 6826; i++ {
208+
bs = append(bs, []byte("—")...)
209+
}
210+
_, _ = EscapeControlBytes(bs)
211+
}

templates/org/home.tmpl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,15 @@
2929
</div>
3030

3131
<div class="ui five wide column">
32+
{{if .CanCreateOrgRepo}}
33+
<div class="center aligned">
34+
<a class="ui green button" href="{{AppSubUrl}}/repo/create?org={{.Org.ID}}">{{.i18n.Tr "new_repo"}}</a>
35+
{{if not .DisableNewPullMirrors}}
36+
<a class="ui green button" href="{{AppSubUrl}}/repo/migrate?org={{.Org.ID}}&mirror=1">{{.i18n.Tr "new_migrate"}}</a>
37+
{{end}}
38+
</div>
39+
<div class="ui divider"></div>
40+
{{end}}
3241
<h4 class="ui top attached header df">
3342
<strong class="f1">{{.i18n.Tr "org.people"}}</strong>
3443
{{if .IsOrganizationMember}}

0 commit comments

Comments
 (0)