Browse Source

Minor fix for #3246

pull/3250/head
Unknwon 9 years ago
parent
commit
9fcf66f0e0
  1. 2
      README.md
  2. 4
      conf/locale/locale_en-US.ini
  3. 2
      gogs.go
  4. 7
      models/repo.go
  5. 1105
      modules/bindata/bindata.go
  6. 2
      templates/.VERSION
  7. 2
      templates/repo/settings/options.tmpl

2
README.md

@ -3,7 +3,7 @@ Gogs - Go Git Service [![Build Status](https://travis-ci.org/gogits/gogs.svg?bra
![](https://github.com/gogits/gogs/blob/master/public/img/gogs-large-resize.png?raw=true)
##### Current tip version: 0.9.38 (see [Releases](https://github.com/gogits/gogs/releases) for binary versions)
##### Current tip version: 0.9.40 (see [Releases](https://github.com/gogits/gogs/releases) for binary versions)
| Web | UI | Preview |
|:-------------:|:-------:|:-------:|

4
conf/locale/locale_en-US.ini

@ -350,11 +350,11 @@ readme_helper = Select a readme template
auto_init = Initialize this repository with selected files and template
create_repo = Create Repository
default_branch = Default Branch
mirror_prune = Prune
mirror_prune_desc = Remove any remote-tracking references that no longer exist on the remote
mirror_interval = Mirror Interval (hour)
mirror_address = Mirror Address
mirror_address_desc = Please include necessary user credentials in the address.
mirror_enable_prune = Remove all objects references remotely removed in the mirror
mirror_prune = Prune
watchers = Watchers
stargazers = Stargazers
forks = Forks

2
gogs.go

@ -17,7 +17,7 @@ import (
"github.com/gogits/gogs/modules/setting"
)
const APP_VER = "0.9.38.0708"
const APP_VER = "0.9.40.0709"
func init() {
runtime.GOMAXPROCS(runtime.NumCPU())

7
models/repo.go

@ -551,6 +551,7 @@ type Mirror struct {
RepoID int64
Repo *Repository `xorm:"-"`
Interval int // Hour.
EnablePrune bool `xorm:"NOT NULL DEFAULT true"`
Updated time.Time `xorm:"-"`
UpdatedUnix int64
@ -558,8 +559,6 @@ type Mirror struct {
NextUpdateUnix int64
address string `xorm:"-"`
EnablePrune bool `xorm:"NOT NULL DEFAULT true"`
}
func (m *Mirror) BeforeInsert() {
@ -1684,9 +1683,9 @@ func MirrorUpdate() {
repoPath := m.Repo.RepoPath()
var gitArgs = []string{"remote", "update"}
gitArgs := []string{"remote", "update"}
if m.EnablePrune {
gitArgs = []string{"remote", "update", "--prune"}
gitArgs = append(gitArgs, "--prune")
}
if _, stderr, err := process.ExecDir(

1105
modules/bindata/bindata.go

File diff suppressed because one or more lines are too long

2
templates/.VERSION

@ -1 +1 @@
0.9.38.0708
0.9.40.0709

2
templates/repo/settings/options.tmpl

@ -55,7 +55,7 @@
<label>{{.i18n.Tr "repo.mirror_prune"}}</label>
<div class="ui checkbox">
<input id="enable_prune" name="enable_prune" type="checkbox" {{if .MirrorEnablePrune}}checked{{end}}>
<label>{{.i18n.Tr "repo.mirror_enable_prune"}}</label>
<label>{{.i18n.Tr "repo.mirror_prune_desc"}}</label>
</div>
</div>
<div class="inline field {{if .Err_Interval}}error{{end}}">

Loading…
Cancel
Save