Commit Graph

1569 Commits

Author SHA1 Message Date
Lunny Xiao f2e20c81b6 Refactor struct's time to remove unnecessary memory usage (#3142)
* refactor struct's time to remove unnecessary memory usage

* use AsTimePtr simple code

* fix tests

* fix time compare

* fix template on gpg

* use AddDuration instead of Add
2017-12-11 06:37:04 +02:00
Lunny Xiao 41d6afe0e7 Fix compile failed without gcc (#3130)
* fix comile failed without gcc

* add sqlite tag for unit test
2017-12-10 16:08:19 +02:00
Antoine GIRARD ef78309b65 Improve LFS tests + fix lfs url refs + keep path upper/lowercase in db. (#3092)
* Add failing test

* Fix urls

* Improve url in tests

* improve testing

* Remove debug code

* Add deps

* LFS corner-case : Search on lower but store with case

* Temporary comment of blocking action

* fix hooks

* Use temporary repo for git client test

* Use userPassword in place of hard-coded password
2017-12-08 20:21:37 +08:00
Ethan Koenig 596308f213 Fix missing branch in release bug (#3108) 2017-12-08 13:22:02 +08:00
Ethan Koenig 54907dfbd1 Fix legacy URL redirects (#3100) 2017-12-07 09:09:02 +08:00
Lunny Xiao 2738effddf
fix redis cache failed (#3086) 2017-12-04 23:00:14 +08:00
Ethan Koenig 3c1b1ca78e Fix error message sanitiziation (#3082) 2017-12-04 03:48:03 +02:00
Lauris BH 5dc37b187c
Add reactions to issues/PR and comments (#2856) 2017-12-04 01:14:26 +02:00
techknowlogick 993b86628b Minor copy changes (#3074)
* Minor copy changes
Fixes #3058

* Use TrN for translations that depend on count
Fix minor type with branches count
2017-12-03 22:52:30 +02:00
Ethan Koenig ab62da283a Fix avatar URLs (#3069)
* Fix avatar URLs

* import order
2017-12-03 19:55:13 +08:00
Lunny Xiao b3d5ba6f90 Fix missing password length check when change password (#3039)
* fix missing password length check when change password

* add tests for change password
2017-12-02 19:11:22 +02:00
Lunny Xiao 35cc5b0402
Remove GetRepositoryByRef and add GetRepositoryByOwnerAndName (#3043)
* remove GetRepositoryByRef and add GetRepositoryByOwnerAndName

* fix tests

* fix tests bug

* some improvements
2017-12-02 15:34:39 +08:00
Piotr Orzechowski 57edc3155f Default log level to Info without hardcoding it in installer (#3041) 2017-12-01 15:41:27 +08:00
Ethan Koenig 91f3d77ceb Unit tests for wiki routers (#3022) 2017-11-30 17:52:15 +02:00
Sondre Nilsen 86ee41ec03 Expandable commit bodies (#2980)
* Initial working state of expandable commit bodies

* Fix all commits having showing button for multiline commits

* Refactor checking multiline messages method

* Force newlines with <br> in commit body

* Show multiple lines in the list view of repositories

* Fixed proper newlines and minor refactor

Use <pre> instead of <p>, this is so we can use \n instead of having to manually place <br> into the HTML. Makes it easier to display commit bodies.

* Fix commit list messages jumping around

* Fix indentation in view_list.tmpl

* Use vertical-align: baseline instead of top

* Refactor commit button toggle function

* Remove RenderCommitBodyLink function

* Add comments

* Add newline at the end of _repository.less

* Fix long commit bodies not properly wrapping inside <pre>

* Don't split on double newlines

* Show the commit body in commit view

* Update stylesheets

* Add/fix comments and run make fmt

* Fix spaces not being tabs
2017-11-30 13:08:40 +08:00
Ethan Koenig 013db70fce Removed unused field in form (#3023) 2017-11-29 22:52:34 +02:00
Sandro Santilli 67b0d2175d Set OpenID support on by default when installing new instance (#3010) 2017-11-29 14:47:42 +02:00
Duncan Ogilvie 551f3cbe42 Memory usage improvements (#3013)
* govendor update code.gitea.io/git

Signed-off-by: Duncan Ogilvie <mr.exodia.tpodt@gmail.com>

* Greatly improve memory usage

Signed-off-by: Duncan Ogilvie <mr.exodia.tpodt@gmail.com>
2017-11-29 09:50:39 +08:00
Antoine GIRARD 4035ab05fa Fix git lfs path (#3016)
* add suffix .git

* Remove Content-Type on GET methods

* Add migrations to force creation before any further potential migration
2017-11-29 01:35:23 +02:00
Antoine GIRARD d99f4ab003 Git LFS lock api (#2938)
* Implement routes

* move to api/sdk and create model

* Implement add + list

* List return 200 empty list no 404

* Add verify lfs lock api

* Add delete and start implementing auth control

* Revert to code.gitea.io/sdk/gitea vendor

* Apply needed check for all lfs locks route

* Add simple tests

* fix lint

* Improve tests

* Add delete test + fix

* Add lfs ascii header

* Various fixes from review + remove useless code + add more corner case testing

* Remove repo link since only id is needed.

Save a little of memory and cpu time.

* Improve tests

* Use TEXT column format for path + test

* fix mispell

* Use NewRequestWithJSON for POST tests

* Clean path

* Improve DB format

* Revert uniquess repoid+path

* (Re)-setup uniqueness + max path length

* Fixed TEXT in place of VARCHAR

* Settle back to maximum VARCHAR(3072)

* Let place for repoid in key

* Let place for repoid in key

* Let place for repoid in key

* Revert back
2017-11-28 22:58:37 +02:00
Ethan Koenig b7ebaf6d20 Various wiki bug fixes (#2996)
* Update macaron

* Various wiki bug fixes
2017-11-28 17:43:51 +08:00
Lauris BH 0d4c63fd70
Fix go-get, src and raw urls to new scheme (#2978) 2017-11-27 02:58:54 +02:00
Piotr Orzechowski 183da4c2c1 Fix language names (#2955) 2017-11-23 12:00:48 +08:00
Ethan Koenig 2cb6c51158 Fix over-escaped characters (#2956) 2017-11-22 15:09:48 +08:00
Lunny Xiao 10b54df2b2 Add dingtalk webhook (#2777)
* add dingtalk webhook type

* add vendor

* some fixes

* fix name check

* fix name check & improvment
2017-11-21 06:26:43 +02:00
Jonas Bröms 1f7aab6e19 Drop deprecated GOGS_WORK_DIR use (#2946) 2017-11-21 09:52:47 +08:00
schaffman5 7e6c198f21 Apply LANDING_PAGE config options for logged in users (#2894)
* Extended LANDINGPAGE config variable to logged in users and added switch for 'organizations' in addition to 'home' and 'explore'.

* Updated comments.

Signed-off-by: Mike Schaffer <mschaff@gmail.com>

* Extended LANDINGPAGE config variable to trigger when user logs in and added switch for 'organizations' in addition to 'home' and 'explore'.

Signed-off-by: Mike Schaffer <mschaff@gmail.com>

* Extended LANDINGPAGE config variable to logged in users and added switch for 'organizations' in addition to 'home' and 'explore'.

* Updated comments.

Signed-off-by: Mike Schaffer <mschaff@gmail.com>

* Extended LANDINGPAGE config variable to trigger when user logs in and added switch for 'organizations' in addition to 'home' and 'explore'.

Signed-off-by: Mike Schaffer <mschaff@gmail.com>

* Removed superfluous conditional and correct whitespace.

Signed-off-by: Mike Schaffer <mschaff@gmail.com>

* Update app.ini

Reverted new line.

* Formatting.

Signed-off-by: Mike Schaffer <mschaff@gmail.com>
2017-11-20 15:48:09 +08:00
Lauris BH 7c3e605698 Fix memcache support when value is returned as string always (#2924) 2017-11-16 15:06:34 +08:00
Lauris BH a6f337046f Update go-ini dependency and remove semicolon hack in translations (#2913) 2017-11-15 11:34:42 +08:00
Sandro Santilli e735d8cb25 Gogs -> Gitea (#2909)
rename label
2017-11-14 08:55:57 +08:00
Mura Li f4d12f8d97 Fix run command race (#1470)
* Use exec.CommandContext to simplfy timeout handling

And fixing the data races which can be identified by the added tests when -race enabled.

* Use sleep commmand instead of reading from stdin

* Make the error handling go-esque
2017-11-13 22:51:45 +08:00
Jochen Rill f94e6fd7a5 Correct ldap username validation. (#2880)
PR #342 was only partially applied. Spaces should not be at the start
and end of a username but they can be inside.
2017-11-13 11:32:16 +02:00
Lauris BH 134958fd9f
Fix localization texts that contain semicolon (#2900) 2017-11-13 09:56:10 +02:00
Ethan Koenig f26f4a7e01 Update swagger documentation (#2899)
* Update swagger documentation

Add docs for missing endpoints
Add documentation for request parameters
Make parameter naming consistent
Fix response documentation

* Restore delete comments
2017-11-13 09:02:25 +02:00
Ethan Koenig 5481be0ac5 Fix issue link rendering in commit messages (#2897)
* Fix issue link rendering in commit messages

* Update page.tmpl

* No links for parens

* remove comment
2017-11-13 09:35:55 +08:00
Lauris BH ba2e0240c6
Add LFS object verification step after upload (#2868)
* Add LFS object verification step after upload

* Fix file verification condition and small refactor

* Fix URLs

* Remove newline and return status 422 on failed verification

* Better error hadling
2017-11-08 15:04:19 +02:00
Lunny Xiao 62d0a4d882 Add external markup render support (#2570)
* add external markup render support

* bug fixed

* refacotr codes and fix wrong error log

* fix comments and add check to prevent leaks

* add check for config file and improve the example

* check file close error

* use ioutil.TempFile instead uuid

* correct Render -> Parser

* improve warning when incorrect markup setting

* fix typos
2017-11-07 08:33:06 +02:00
Jacob Parry 6e2e7b325f Fix LFS not returning correct content length when requesting a range of bytes (#2864) 2017-11-07 06:33:04 +02:00
Lunny Xiao ff9daa3e9b fix click create pull request button 404 (#2859) 2017-11-05 21:11:35 +02:00
Mike Fellows be523152a8 Clean repository ROOT directory name with filepath.Clean (#2846)
For better compatibility with Windows.
2017-11-04 23:36:49 +02:00
Lauris BH 57de1ff991
Fix API raw file content access for default branch (#2849) 2017-11-04 19:26:38 +02:00
Lauris BH 08b124dd47
Fix API raw requests for commits and tags (#2841) 2017-11-04 01:23:59 +02:00
Guillaume Dube 8798cf4e3b Set session and indexers' data files rel to AppDataPath (#2192)
* Set session and indexers' data files rel to AppDataPath

The setting AppDataPath is now relative to the working directory.
The session svc's PROVIDER_CONFIG now defaults to AppDataPath/data/sessions.
The issue indexer's IssuePath now defaults to AppDataPath/indexers/issues.bleves.

* fix bug
2017-11-03 10:56:20 +02:00
Morlinest 1f04c00e2f Fix redirect url of legacy commits route (#2825) 2017-11-03 00:01:22 +02:00
Cum Gun eecaba2031 Configurable SSH key exchange algorithm and MAC suite (#2806) 2017-11-02 23:26:41 +08:00
Lauris BH 82fc50f4ee Fix Git LFS object/repo link storage in database and small refactoring (#2803) 2017-10-30 20:11:56 +08:00
Ethan Koenig 513375c429 Make URL scheme unambiguous (#2408)
* Make URL scheme unambiguous

Redirect old routes to new routes

* Fix redirects to new URL scheme, and update template

* Fix branches/_new endpoints, and update integration test
2017-10-30 10:04:25 +08:00
Ethan Koenig 5866eb2321 Code/repo search (#2582)
Indexed search of repository contents (for default branch only)
2017-10-27 09:10:54 +03:00
Lauris BH eca05b09aa Add commit count caching (#2774)
* Add commit count caching

* Small refactoring

* Add different key prefix for refs and commits

* Add configuratuion option to allow to change caching time or disable it
2017-10-26 09:37:33 +08:00
Bwko 3ab580c8d6 Add branch overiew page (#2108)
* Add branch overiew page

* fix changed method name on sub menu

* remove unused code
2017-10-26 08:49:16 +08:00