summaryrefslogtreecommitdiffstats
path: root/routers/repo/wiki.go
Commit message (Collapse)AuthorAgeFilesLines
* Improve listing performance by using go-git (#6478)Filip Navara2019-04-191-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use go-git for tree reading and commit info lookup. Signed-off-by: Filip Navara <navara@emclient.com> * Use TreeEntry.IsRegular() instead of ObjectType that was removed. Signed-off-by: Filip Navara <navara@emclient.com> * Use the treePath to optimize commit info search. Signed-off-by: Filip Navara <navara@emclient.com> * Extract the latest commit at treePath along with the other commits. Signed-off-by: Filip Navara <navara@emclient.com> * Fix listing commit info for a directory that was created in one commit and never modified after. Signed-off-by: Filip Navara <navara@emclient.com> * Avoid nearly all external 'git' invocations when doing directory listing (.editorconfig code path is still hit). Signed-off-by: Filip Navara <navara@emclient.com> * Use go-git for reading blobs. Signed-off-by: Filip Navara <navara@emclient.com> * Make SHA1 type alias for plumbing.Hash in go-git. Signed-off-by: Filip Navara <navara@emclient.com> * Make Signature type alias for object.Signature in go-git. Signed-off-by: Filip Navara <navara@emclient.com> * Fix GetCommitsInfo for repository with only one commit. Signed-off-by: Filip Navara <navara@emclient.com> * Fix PGP signature verification. Signed-off-by: Filip Navara <navara@emclient.com> * Fix issues with walking commit graph across merges. Signed-off-by: Filip Navara <navara@emclient.com> * Fix typo in condition. Signed-off-by: Filip Navara <navara@emclient.com> * Speed up loading branch list by keeping the repository reference (and thus all the loaded packfile indexes). Signed-off-by: Filip Navara <navara@emclient.com> * Fix lising submodules. Signed-off-by: Filip Navara <navara@emclient.com> * Fix build Signed-off-by: Filip Navara <navara@emclient.com> * Add back commit cache because of name-rev Signed-off-by: Filip Navara <navara@emclient.com> * Fix tests Signed-off-by: Filip Navara <navara@emclient.com> * Fix code style * Fix spelling * Address PR feedback Signed-off-by: Filip Navara <navara@emclient.com> * Update vendor module list Signed-off-by: Filip Navara <navara@emclient.com> * Fix getting trees by commit id Signed-off-by: Filip Navara <navara@emclient.com> * Fix remaining unit test failures * Fix GetTreeBySHA * Avoid running `git name-rev` if not necessary Signed-off-by: Filip Navara <navara@emclient.com> * Move Branch code to git module * Clean up GPG signature verification and fix it for tagged commits * Address PR feedback (import formatting, copyright headers) * Make blob lookup by SHA working * Update tests to use public API * Allow getting content from any type of object through the blob interface * Change test to actually expect the object content that is in the GIT repository * Change one more test to actually expect the object content that is in the GIT repository * Add comments
* move code.gitea.io/git to code.gitea.io/gitea/modules/git (#6364)Lunny Xiao2019-03-271-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * move code.gitea.io/git to code.gitea.io/gitea/modules/git * fix imports * fix fmt * fix misspell * remove wrong tests data * fix unit tests * fix tests * fix tests * fix tests * fix tests * fix tests * enable Debug to trace the failure tests * fix tests * fix tests * fix tests * fix tests * fix tests * comment commit count tests since git clone depth is 50 * fix tests * update from code.gitea.io/git * revert change to makefile
* Fix serving of raw wiki files other than .md (#5814)Gabriel Silva Simões2019-02-051-13/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix serving of raw wiki files other than .md Closes #4690. Closes #4395. Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com> * Simplify code at routers/repo/wiki.go Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com> * Add more files to user2/repo1.wiki for testing Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com> * Update macaron to v1.3.2 Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com> * Add tests for WikiRaw Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com> * Fix NewResponseWriter usage due to macaron update Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com> * Add raw to reserved wiki names Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com>
* Feature: Archive repos (#5009)kolaente2019-01-231-2/+2
|
* Disallow empty titles (#5785)Lanre Adelowo2019-01-211-0/+5
| | | | | | | | | | | | * add util method and tests * make sure the title of an issue cannot be empty * wiki title cannot be empty * pull request title cannot be empty * update to make use of the new util methof
* Fix empty wiki (#5504)Lunny Xiao2018-12-091-1/+3
| | | | | | * fix wiki page when wiki path is exist but empty * improve the error check
* Restrict permission check on repositories and fix some problems (#5314)Lunny Xiao2018-11-281-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fix units permission problems * fix some bugs and merge LoadUnits to repoAssignment * refactor permission struct and add some copyright heads * remove unused codes * fix routes units check * improve permission check * add unit tests for permission * fix typo * fix tests * fix some routes * fix api permission check * improve permission check * fix some permission check * fix tests * fix tests * improve some permission check * fix some permission check * refactor AccessLevel * fix bug * fix tests * fix tests * fix tests * fix AccessLevel * rename CanAccess * fix tests * fix comment * fix bug * add missing unit for test repos * fix bug * rename some functions * fix routes check
* Fix wiki redirects (#3919)Michael Kuhn2018-05-281-2/+2
| | | | When creating or editing a wiki page, the redirect to the wiki page does not work because the file name is used instead of the page name.
* Fix rendering of wiki page list if wiki repo contains other files (#3454)Lauris BH2018-02-051-0/+6
| | | | | | * Fix rendering of wiki page list if wiki repo contains other files * Improve wiki filename tests
* Handle refactor (#3339)Morgan Bazalgette2018-01-101-19/+19
| | | | | | * Replace all ctx.Handle with ctx.ServerError or ctx.NotFound * Change Handle(403) to NotFound, avoid using macaron's NotFound
* Fix wiki page list not rendering after updatedunix changes (#3175)Lauris BH2017-12-131-7/+7
|
* Various wiki bug fixes (#2996)Ethan Koenig2017-11-281-241/+125
| | | | | | * Update macaron * Various wiki bug fixes
* Add init support of orgmode document type on file view and readme (#2525)Lunny Xiao2017-09-211-1/+1
| | | | | | | | | | | | | | * add init support of orgmode document type on file view and readme * fix imports * fix imports and readmeExist * fix imports order * fix format * remove unnecessary convert
* EnableUnit() -> UnitEnabled() (#2242)Ethan Koenig2017-08-021-2/+2
|
* Add markup package to prepare for org markup format (#1493)Lunny Xiao2017-04-211-1/+2
|
* fix wiki bugs (#1294)Lunny Xiao2017-03-201-4/+16
|
* fix UI display problem when wiki name is non-ascii charset (#1142)Lunny Xiao2017-03-081-2/+2
|
* Markdown rendering overhaul (#186)Andrew Boyarshin2017-02-141-41/+260
| | | | | | | | | | | | * Markdown rendering overhaul Cleaned up and squashed commits into single one. Signed-off-by: Andrew Boyarshin <boyarshinand@gmail.com> * Fix markdown API, add markdown module and API tests, improve code coverage Signed-off-by: Andrew Boyarshin <boyarshinand@gmail.com>
* Add units concept for modulable functions of a repository (#742)Lunny Xiao2017-02-041-3/+5
| | | | | | | | | | | | | | | | * Add units concept for modulable functions of a repository * remove unused comment codes & fix lints and tests * remove unused comment codes * use struct config instead of map * fix lint * rm wrong files * fix tests
* fixed bugs on Wiki and resolved #667 (#674)Lunny Xiao2017-01-211-10/+14
|
* update code.gitea.io/git (#450)Lunny Xiao2016-12-221-2/+2
|
* golint fixed for routers/repo/wiki.go (#203)Lunny Xiao2016-11-211-12/+21
|
* Update import paths from github.com/go-gitea to code.gitea.io (#135)Sandro Santilli2016-11-101-6/+6
| | | | | | | - Update import paths from github.com/go-gitea to code.gitea.io - Fix import path for travis See https://docs.travis-ci.com/user/languages/go#Go-Import-Path
* Replace gogits/git-module dependency with go-gitea/git (#94)Sandro Santilli2016-11-061-1/+1
| | | | | | | | * Replace gogits/git-module dependency with go-gitea/git Fixes #92 * Remove git alias for git module import (not needed)
* Change import reference to match gitea instead of gogs (#37)Rémy Boulanouar2016-11-031-5/+5
|
* Do not show filename not have suffifx .mdUnknwon2016-07-011-2/+2
|
* Rename module: middleware -> contextUnknwon2016-03-111-10/+10
|
* Minor fixes for #2746Unknwon2016-03-041-2/+1
|
* Add ability to delete single wiki pages.Josh Frye2016-03-041-0/+18
|
* Make markdown as an independent moduleUnknwon2016-02-201-1/+2
|
* rename import pathUnknwon2015-12-151-1/+1
|
* #2114 External URL for wikiUnknwon2015-12-111-0/+6
|
* move out git module and #1573 send push hookUnknwon2015-12-091-4/+4
|
* fix #1829 and fix #890Unknwon2015-12-041-1/+7
|
* wiki: finish pagesUnknwon2015-11-271-7/+54
|
* wiki: finish editUnknwon2015-11-271-23/+102
|
* wiki: finish newUnknwon2015-11-271-3/+58
|
* introduce git-shellUnknwon2015-11-261-6/+21
|
* Wiki: UI for page newUnknwon2015-11-251-0/+49