mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-29 10:57:44 +09:00 
			
		
		
		
	Whitespace in commits (#14650)
* Add whitespace to commit view * Add whitespace to /compare/a...b * Move repeated whitespaceFlags to gitdiff * Add whitespace for wiki pages
This commit is contained in:
		| @@ -695,8 +695,8 @@ func RegisterRoutes(m *web.Route) { | ||||
| 			m.Get("/{id}", repo.MilestoneIssuesAndPulls) | ||||
| 		}, reqRepoIssuesOrPullsReader, context.RepoRef()) | ||||
| 		m.Combo("/compare/*", repo.MustBeNotEmpty, reqRepoCodeReader, repo.SetEditorconfigIfExists). | ||||
| 			Get(ignSignIn, repo.SetDiffViewStyle, repo.CompareDiff). | ||||
| 			Post(reqSignIn, context.RepoMustNotBeArchived(), reqRepoPullsReader, repo.MustAllowPulls, bindIgnErr(auth.CreateIssueForm{}), repo.CompareAndPullRequestPost) | ||||
| 			Get(ignSignIn, repo.SetDiffViewStyle, repo.SetWhitespaceBehavior, repo.CompareDiff). | ||||
| 			Post(reqSignIn, context.RepoMustNotBeArchived(), reqRepoPullsReader, repo.MustAllowPulls, bindIgnErr(auth.CreateIssueForm{}), repo.SetWhitespaceBehavior, repo.CompareAndPullRequestPost) | ||||
| 	}, context.RepoAssignment(), context.UnitTypes()) | ||||
|  | ||||
| 	// Grouping for those endpoints that do require authentication | ||||
| @@ -885,7 +885,7 @@ func RegisterRoutes(m *web.Route) { | ||||
| 			m.Get("/{page}", repo.Wiki) | ||||
| 			m.Get("/_pages", repo.WikiPages) | ||||
| 			m.Get("/{page}/_revision", repo.WikiRevision) | ||||
| 			m.Get("/commit/{sha:[a-f0-9]{7,40}}", repo.SetEditorconfigIfExists, repo.SetDiffViewStyle, repo.Diff) | ||||
| 			m.Get("/commit/{sha:[a-f0-9]{7,40}}", repo.SetEditorconfigIfExists, repo.SetDiffViewStyle, repo.SetWhitespaceBehavior, repo.Diff) | ||||
| 			m.Get("/commit/{sha:[a-f0-9]{7,40}}.{:patch|diff}", repo.RawDiff) | ||||
|  | ||||
| 			m.Group("", func() { | ||||
| @@ -977,7 +977,7 @@ func RegisterRoutes(m *web.Route) { | ||||
|  | ||||
| 		m.Group("", func() { | ||||
| 			m.Get("/graph", repo.Graph) | ||||
| 			m.Get("/commit/{sha:([a-f0-9]{7,40})$}", repo.SetEditorconfigIfExists, repo.SetDiffViewStyle, repo.Diff) | ||||
| 			m.Get("/commit/{sha:([a-f0-9]{7,40})$}", repo.SetEditorconfigIfExists, repo.SetDiffViewStyle, repo.SetWhitespaceBehavior, repo.Diff) | ||||
| 		}, repo.MustBeNotEmpty, context.RepoRef(), reqRepoCodeReader) | ||||
|  | ||||
| 		m.Group("/src", func() { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user