Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into forgefriends-mr44
Browse files Browse the repository at this point in the history
  • Loading branch information
singuliere committed Feb 20, 2022
2 parents dcf21dc + d5a4c55 commit 22756fe
Show file tree
Hide file tree
Showing 16 changed files with 711 additions and 193 deletions.
1 change: 1 addition & 0 deletions modules/charset/escape.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ readingloop:
for err == nil {
n, err = text.Read(buf[readStart:])
bs := buf[:n+readStart]
n = len(bs)
i := 0

for i < len(bs) {
Expand Down
9 changes: 9 additions & 0 deletions modules/charset/escape_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,3 +200,12 @@ func TestEscapeControlReader(t *testing.T) {
})
}
}

func TestEscapeControlReader_panic(t *testing.T) {
bs := make([]byte, 0, 20479)
bs = append(bs, 'A')
for i := 0; i < 6826; i++ {
bs = append(bs, []byte("—")...)
}
_, _ = EscapeControlBytes(bs)
}
1 change: 1 addition & 0 deletions modules/graceful/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ func (g *Manager) RunAtHammer(hammer func()) {

func (g *Manager) doShutdown() {
if !g.setStateTransition(stateRunning, stateShuttingDown) {
g.DoImmediateHammer()
return
}
g.lock.Lock()
Expand Down
8 changes: 6 additions & 2 deletions modules/graceful/manager_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,12 @@ func (g *Manager) DoGracefulRestart() {
if setting.GracefulRestartable {
log.Info("PID: %d. Forking...", os.Getpid())
err := g.doFork()
if err != nil && err.Error() != "another process already forked. Ignoring this one" {
log.Error("Error whilst forking from PID: %d : %v", os.Getpid(), err)
if err != nil {
if err.Error() == "another process already forked. Ignoring this one" {
g.DoImmediateHammer()
} else {
log.Error("Error whilst forking from PID: %d : %v", os.Getpid(), err)
}
}
} else {
log.Info("PID: %d. Not set restartable. Shutting down...", os.Getpid())
Expand Down
3 changes: 3 additions & 0 deletions options/gitignore/Android
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ output.json
# IntelliJ
*.iml
.idea/
misc.xml
deploymentTargetDropDown.xml
render.experimental.xml

# Keystore files
*.jks
Expand Down
4 changes: 4 additions & 0 deletions options/gitignore/CDK
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# CDK asset staging directory.
# For more information about AWS-CDK, see https://docs.aws.amazon.com/cdk/
.cdk.staging/
cdk.out/
3 changes: 3 additions & 0 deletions options/gitignore/Gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ gradle-app.setting
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar

# Avoid ignore Gradle wrappper properties
!gradle-wrapper.properties

# Cache of project
.gradletasknamecache

Expand Down
2 changes: 1 addition & 1 deletion options/gitignore/Perl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ cover_db/
# Devel::NYTProf
nytprof.out

# Dizt::Zilla
# Dist::Zilla
/.build/

# Module::Build
Expand Down
2 changes: 1 addition & 1 deletion options/gitignore/Python
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ dmypy.json
cython_debug/

# PyCharm
# JetBrains specific template is maintainted in a separate JetBrains.gitignore that can
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
Expand Down
3 changes: 1 addition & 2 deletions options/gitignore/Terraform
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ crash.*.log
# password, private keys, and other secrets. These should not be part of version
# control as they are data points which are potentially sensitive and subject
# to change depending on the environment.
#
*.tfvars
*.tfvars.json

# Ignore override files as they are usually used to override resources locally and so
# are not checked in
Expand All @@ -24,7 +24,6 @@ override.tf.json
*_override.tf.json

# Include override files you do wish to add to version control using negated pattern
#
# !example_override.tf

# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan
Expand Down
2 changes: 2 additions & 0 deletions options/gitignore/Toit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.packages
*_pb.toit
2 changes: 1 addition & 1 deletion options/gitignore/VisualStudio
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ node_modules/
*.dsw
*.dsp

# Visual Studio 6 technical files
# Visual Studio 6 technical files
*.ncb
*.aps

Expand Down
415 changes: 322 additions & 93 deletions options/license/MPL-2.0

Large diffs are not rendered by default.

415 changes: 322 additions & 93 deletions options/license/MPL-2.0-no-copyleft-exception

Large diffs are not rendered by default.

25 changes: 25 additions & 0 deletions options/license/X11-distribute-modifications-variant
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Copyright (c) <year> <copyright holders>

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, distribute with modifications, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Except as contained in this notice, the name(s) of the above copyright
holders shall not be used in advertising or otherwise to promote the
sale, use or other dealings in this Software without prior written
authorization.
9 changes: 9 additions & 0 deletions templates/org/home.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@
</div>

<div class="ui five wide column">
{{if .CanCreateOrgRepo}}
<div class="center aligned">
<a class="ui green button" href="{{AppSubUrl}}/repo/create?org={{.Org.ID}}">{{.i18n.Tr "new_repo"}}</a>
{{if not .DisableNewPullMirrors}}
<a class="ui green button" href="{{AppSubUrl}}/repo/migrate?org={{.Org.ID}}&mirror=1">{{.i18n.Tr "new_migrate"}}</a>
{{end}}
</div>
<div class="ui divider"></div>
{{end}}
<h4 class="ui top attached header df">
<strong class="f1">{{.i18n.Tr "org.people"}}</strong>
{{if .IsOrganizationMember}}
Expand Down

0 comments on commit 22756fe

Please sign in to comment.