Unknwon %!s(int64=9) %!d(string=hai) anos
pai
achega
b3a45693c3
Modificáronse 4 ficheiros con 15 adicións e 10 borrados
  1. 14 7
      models/repo.go
  2. 0 0
      public/css/gogs.min.css
  3. 1 1
      public/less/_base.less
  4. 0 2
      templates/user/dashboard/navbar.tmpl

+ 14 - 7
models/repo.go

@@ -575,15 +575,22 @@ func initRepository(e Engine, repoPath string, u *User, repo *Repository, initRe
 		delete(fileName, "license")
 	}
 
+	// Re-fetch the repository from database before updating it (else it would
+	// override changes that were done earlier with sql)
+	if repo, err = getRepositoryByID(e, repo.ID); err != nil {
+		return fmt.Errorf("getRepositoryByID: %v", err)
+	}
 	if len(fileName) == 0 {
-		// Re-fetch the repository from database before updating it (else it would
-		// override changes that were done earlier with sql)
-		if repo, err = getRepositoryByID(e, repo.ID); err != nil {
-			return err
-		}
 		repo.IsBare = true
-		repo.DefaultBranch = "master"
-		return updateRepository(e, repo, false)
+	}
+	repo.DefaultBranch = "master"
+	if err = updateRepository(e, repo, false); err != nil {
+		return fmt.Errorf("updateRepository: %v", err)
+	}
+
+	// Ignore init process if user choose not to.
+	if len(fileName) == 0 {
+		return nil
 	}
 
 	// Apply changes and commit.

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
public/css/gogs.min.css


+ 1 - 1
public/less/_base.less

@@ -216,6 +216,6 @@ footer {
 
 @media only screen and (max-width: 991px) and (min-width: 768px) {
 	.ui.container {
-		width: 90%;
+		width: 95%;
 	}
 }

+ 0 - 2
templates/user/dashboard/navbar.tmpl

@@ -14,13 +14,11 @@
     		{{.SignedUser.Name}}
     	</a>
     	{{range .Orgs}}
-    	{{if .IsOwnedBy $.SignedUser.Id}}
     	<a class="{{if eq $.ContextUser.Id .Id}}active selected{{end}} item" href="{{AppSubUrl}}/org/{{.Name}}/issues">
       	<img class="ui image" src="{{.AvatarLink}}">
     		{{.Name}}
     	</a>
     	{{end}}
-    	{{end}}
     	<a class="item" href="{{AppSubUrl}}/org/create">
     		<i class="octicon octicon-repo-create"></i>&nbsp;&nbsp;&nbsp;{{.i18n.Tr "new_org"}}
     	</a>

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio