itdoxy-lab/modules
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>
2019-02-12 15:07:31 +02:00
..
auth In basic auth check for tokens before call UserSignIn (#5725) 2019-02-12 11:20:08 +02:00
avatar
base
cache
context Provide better panic handling (#5902) 2019-01-30 17:00:00 -05:00
cron
generate
gzip Pooled and buffered gzip implementation (#5722) 2019-01-23 10:56:51 +02:00
highlight
httplib
indexer fix indexer reindex bug when gitea restart (#5563) 2018-12-19 16:37:48 +08:00
lfs Fix bug when read public repo lfs file (#5912) 2019-01-31 13:36:57 +00:00
log Allow Macaron to be set to log through to gitea.log (#5667) 2019-02-05 22:06:41 -05:00
mailer Make log mailer for testing (#5893) 2019-02-02 21:06:52 -05:00
markup Recover panic in orgmode.Render if bad orgfile (#4982) (#5903) 2019-01-30 17:17:43 -05:00
metrics
minwinsvc
notification Refactor notification for indexer (#5111) 2019-01-17 22:23:22 +08:00
options
pprof
private Fix ssh deploy and user key constraints (#1357) (#5939) 2019-02-03 23:56:53 +00:00
process
public When redirecting clean the path to avoid redirecting to //www.othersite.com (#5669) 2019-01-09 13:39:01 -05:00
recaptcha
search
setting Add option to close issues via commit on a non master branch (#5992) 2019-02-10 21:27:19 +02:00
ssh use native golang SSH library but ssh-keygen when enable built-in SSH server to remove dependent on that command lines (#5976) 2019-02-07 02:13:12 -05:00
sync
templates
test
uploader Refactor editor upload, update and delete to use git plumbing and add LFS support (#5702) 2019-02-12 15:07:31 +02:00
user
util Disallow empty titles (#5785) 2019-01-21 13:45:32 +02:00
validation