zeripath
296814e887
Refactor editor upload, update and delete to use git plumbing and add LFS support ( #5702 )
...
* Use git plumbing for upload: #5621 repo_editor.go: UploadRepoFile
* Use git plumbing for upload: #5621 repo_editor.go: GetDiffPreview
* Use git plumbing for upload: #5621 repo_editor.go: DeleteRepoFile
* Use git plumbing for upload: #5621 repo_editor.go: UploadRepoFiles
* Move branch checkout functions out of repo_editor.go as they are no longer used there
* BUGFIX: The default permissions should be 100644
This is a change from the previous code but is more in keeping
with the default behaviour of git.
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Standardise cleanUploadFilename to more closely match git
See verify_path in: 7f4e641693/read-cache.c (L951)
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Redirect on bad paths
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Refactor to move the uploading functions out to a module
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add LFS support
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update upload.go attribution header
Upload.go is essentially the remnants of repo_editor.go. The remaining code is essentially unchanged from the Gogs code, hence the Gogs attribution.
* Delete upload files after session committed
* Ensure that GIT_AUTHOR_NAME etc. are valid for git
see #5774
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add in test cases per @lafriks comment
* Add space between gitea and github imports
Signed-off-by: Andrew Thornton <art27@cantab.net>
* more examples in TestCleanUploadName
Signed-off-by: Andrew Thornton <art27@cantab.net>
* fix formatting
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Set the SSH_ORIGINAL_COMMAND to ensure hooks are run
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Switch off SSH_ORIGINAL_COMMAND
Signed-off-by: Andrew Thornton <art27@cantab.net>
6 years ago
zeripath
fd1e8563f8
SECURITY: protect DeleteFilePost et al with cleanUploadFileName ( #5631 )
...
This commit wraps more of the TreePaths with cleanUploadFileName
Signed-off-by: Andrew Thornton <art27@cantab.net>
6 years ago
Lunny Xiao
4a02a783c4
fix bug on upload file name ( #5571 )
6 years ago
Lauris BH
181b3a8f09
Fix path cleanup in multiple places ( #3871 )
7 years ago
Morgan Bazalgette
65861900cd
Handle refactor ( #3339 )
...
* Replace all ctx.Handle with ctx.ServerError or ctx.NotFound
* Change Handle(403) to NotFound, avoid using macaron's NotFound
7 years ago
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>
7 years ago
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
7 years ago
Lunny Xiao
1739e84ac0
improve protected branch to add whitelist support ( #2451 )
...
* improve protected branch to add whitelist support
* fix lint
* fix style check
* fix tests
* fix description on UI and import
* fix test
* bug fixed
* fix tests and languages
* move isSliceInt64Eq to util pkg; improve function names & typo
7 years ago
Lunny Xiao
228247511a
repo/editor: fix breadcrumb path cuts parent dirs ( #3859 ) ( #2032 )
7 years ago
Lauris BH
0144817971
Do not allow commiting to protected branch from online editor ( #1502 )
...
* Do not allow commiting to protected branch from online editor
* Add editor integration tests for adding new file and not allowing to add new file to protected branch
8 years ago
Lunny Xiao
0e1392501d
Check if file is a symlink with web editor ( #3687 ) ( #445 )
...
* Check if file is a symlink with web editor (#3687 )
* editor checks for symlinks
* translate file_is_a_symlink message
* credit translation author
* fix error constant
8 years ago
Thomas Boerger
83ed234472
Integrate templates into bindata optionally ( #314 )
...
Integrated optional bindata for the templates
8 years ago
Lunny Xiao
94da472717
Golint fixed for modules/setting ( #262 )
...
* golint fixed for modules/setting
* typo fixed and renamed UNIXSOCKET to UnixSocket
8 years ago
Lunny Xiao
229ec927b9
Golint fixed for modules/template
8 years ago
Lunny Xiao
3917ed45de
golint fixed for routers ( #208 )
8 years ago
Thibault Meyer
ddee4c8b58
Normalize files with gofmt
8 years ago
Sandro Santilli
4247304f5a
Update import paths from github.com/go-gitea to code.gitea.io ( #135 )
...
- 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
8 years ago
Flare
01c5233b53
Fixed 404 caused by unexpected question mark
...
This fixes 404 caused when creating new files or wiki pages with question marks. Amended to force CI rebuild
8 years ago
Sandro Santilli
6e4252dad4
Replace gogits/git-module dependency with go-gitea/git ( #94 )
...
* Replace gogits/git-module dependency with go-gitea/git
Fixes #92
* Remove git alias for git module import (not needed)
8 years ago
Matthias Loibl
1f44b01e2a
Fix imports found by goimports.
8 years ago
Thomas Boerger
e05a5ca36c
Executed go fmt for all files
8 years ago
Rémy Boulanouar
2d68bd1ef9
Change import reference to match gitea instead of gogs ( #37 )
8 years ago
Unknwon
dadd35b636
#3559 fix template error
8 years ago
Andrey Nering
9ac46fb983
Support Editorconfig on web editor
8 years ago
Unknwon
643142acab
Web editor: support upload files
8 years ago
Unknwon
780cc2d110
router/repo: code refactoring
8 years ago
Unknwon
62b0dc4853
Web editor: fix cannot create new file in subdirectory
8 years ago
Unknwon
429c92c0ce
#3516 enforce line ending to be \n from web editor
8 years ago
Unknwon
ba27d71abe
Web editor: improve edit file
8 years ago
Unknwon
0114fdcba4
Web editor: improve delete file process
8 years ago
Unknwon
f8a48ffaad
Web editor: improve code quality
8 years ago
Unknwon
a00c932bbc
General code quality improvement
8 years ago
Unknwon
2625193a48
models/repo_editor: improve code quality
8 years ago
Unknwon
8637e67e6f
Fix outdated edit can’t overwrite changes
8 years ago
Unknwon
54e0ada9d5
Web editor: improve delete file
8 years ago
Unknwon
cd89f6c502
Web editor: improve edit file and diff preview
8 years ago
Unknwon
15845cb287
Code clean up for new config options
8 years ago
Richard Mahn
d0a0239bac
Squashed commit of the following:
...
commit 0afcb843d7ffd596991c4885cab768273a6eb42c
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date: Sun Jul 31 17:13:29 2016 -0600
Removed Upload stats as the upload table is just a temporary table
commit 7ecd73ff5535612d79d471409173ee7f1fcfa157
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date: Sun Jul 31 08:42:41 2016 -0600
Fix for CodeMirror mode
commit c29b9ab531e2e7af0fb5db24dc17e51027dd1174
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date: Sun Jul 31 08:03:33 2016 -0600
Made tabbing in editor use spaces
commit 23af384c53206a8a40e11e45bf49d7a149c4adcd
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date: Sun Jul 31 07:56:46 2016 -0600
Fix for data-url
commit cfb8a97591cb6fc0a92e49563b7b764c524db0e9
Merge: 7fc8a89 991ce42
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date: Sun Jul 31 07:42:53 2016 -0600
Merge remote-tracking branch 'gogits/develop' into feature-create-and-edit-repo-file
Conflicts:
modules/bindata/bindata.go
public/js/gogs.js
commit 7fc8a89cb495478225b02d613e647f99a1489634
Merge: fd3d86c c03d040
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date: Sun Jul 31 07:40:00 2016 -0600
Merge branch 'feature-create-and-edit-repo-file' of github.com:richmahn/gogs into feature-create-and-edit-repo-file
commit fd3d86ca6bbc02cfda566a504ffd6b03db4f75ef
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date: Sun Jul 31 07:39:44 2016 -0600
Code cleanup
commit c03d0401c1049eeeccc32ab1f9c3303c130be5ee
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date: Fri Jul 29 15:38:23 2016 -0600
Code cleanup
commit 98e1206ccf9f9a4503c020e3a7830cf9f861dfae
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date: Thu Jul 28 18:36:01 2016 -0600
Code cleanup and fixes
commit c2895dc742f25f8412879c9fa15e18f27f42f194
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date: Thu Jul 28 18:24:04 2016 -0600
Fixes per Unknwon's requests
commit 6aa7e46b21ad4c96e562daa2eac26a8fb408f8ef
Merge: 889e9fa ad7ea88
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date: Thu Jul 28 17:13:43 2016 -0600
Merge remote-tracking branch 'gogits/develop' into feature-create-and-edit-repo-file
Conflicts:
modules/bindata/bindata.go
modules/setting/setting.go
commit 889e9faf1bd8559a4979c8f46005d488c1a234d4
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date: Fri Jul 22 14:09:18 2016 -0600
Fix in gogs.js
commit 47603edf223f147b114be65f3bd27bc1e88827a5
Merge: bb57912 cf85e9e
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date: Fri Jul 22 14:07:36 2016 -0600
Merge remote-tracking branch 'gogits/develop' into feature-create-and-edit-repo-file
Conflicts:
modules/bindata/bindata.go
public/js/gogs.js
commit bb5791255867a71c11a77b639db050ad09c597a4
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date: Fri Jul 22 14:02:18 2016 -0600
Update for using CodeMirror mode addon
commit d10d128c51039be19e2af9c66c63db66a9f2ec6d
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date: Tue Jul 19 16:12:57 2016 -0600
Update for Edit
commit 34a34982025144e3225e389f7849eb6273c1d576
Merge: fa1b752 1c7dcdd
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date: Tue Jul 19 11:52:02 2016 -0600
Merge remote-tracking branch 'gogits/develop' into feature-create-and-edit-repo-file
Conflicts:
modules/bindata/bindata.go
commit fa1b752be29cd455c5184ddac2ffe80b3489763e
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date: Fri Jul 15 18:35:42 2016 -0600
Feature for editing, creating, uploading and deleting files
8 years ago