60 Commits (e78786ef39526fac6705a831fc291c55f1ca091b)

Author SHA1 Message Date
Kim "BKC" Carlbäcker 4b5197beb4 Fix Uninitialized variable in ParsePatch (#3156) 7 years ago
Duncan Ogilvie c80d147fa9 Improve memory usage when reaching diff limits (#2990)
Signed-off-by: Duncan Ogilvie <mr.exodia.tpodt@gmail.com>
7 years ago
Ethan Koenig 57cabb3ad3 Fix diff of renamed and modified file (#1967) 7 years ago
Kuba Tyszko 5d6b71fdbb fixes pull request hanging indefinitely when it contains normal and LFS file pointers (#1425) 7 years ago
Matthias Loibl d1006150fb Refactor process package and introduce ProcessManager{} with tests (#75)
* Add a process.Manager singleton with process.GetManager()

* Use process.GetManager everywhere

* Fix godoc comments for process module

* Increment process counter id after locking the mutex
8 years ago
Ethan Koenig 1207bda94b Fix typos in models/ (#576) 8 years ago
Fabian Zaremba 2e7ccecfe6 Git LFS support v2 (#122)
* Import github.com/git-lfs/lfs-test-server as lfs module base

Imported commit is 3968aac269a77b73924649b9412ae03f7ccd3198

Removed:

Dockerfile CONTRIBUTING.md mgmt* script/ vendor/ kvlogger.go
.dockerignore .gitignore README.md

* Remove config, add JWT support from github.com/mgit-at/lfs-test-server

Imported commit f0cdcc5a01599c5a955dc1bbf683bb4acecdba83

* Add LFS settings

* Add LFS meta object model

* Add LFS routes and initialization

* Import github.com/dgrijalva/jwt-go into vendor/

* Adapt LFS module: handlers, routing, meta store

* Move LFS routes to /user/repo/info/lfs/*

* Add request header checks to LFS BatchHandler / PostHandler

* Implement LFS basic authentication

* Rework JWT secret generation / load

* Implement LFS SSH token authentication with JWT

Specification: https://github.com/github/git-lfs/tree/master/docs/api

* Integrate LFS settings into install process

* Remove LFS objects when repository is deleted

Only removes objects from content store when deleted repo is the only
referencing repository

* Make LFS module stateless

Fixes bug where LFS would not work after installation without
restarting Gitea

* Change 500 'Internal Server Error' to 400 'Bad Request'

* Change sql query to xorm call

* Remove unneeded type from LFS module

* Change internal imports to code.gitea.io/gitea/

* Add Gitea authors copyright

* Change basic auth realm to "gitea-lfs"

* Add unique indexes to LFS model

* Use xorm count function in LFS check on repository delete

* Return io.ReadCloser from content store and close after usage

* Add LFS info to runWeb()

* Export LFS content store base path

* LFS file download from UI

* Work around git-lfs client issue with unauthenticated requests

Returning a dummy Authorization header for unauthenticated requests
lets git-lfs client skip asking for auth credentials
See: https://github.com/github/git-lfs/issues/1088

* Fix unauthenticated UI downloads from public repositories

* Authentication check order, Finish LFS file view logic

* Ignore LFS hooks if installed for current OS user

Fixes Gitea UI actions for repositories tracking LFS files.
Checks for minimum needed git version by parsing the semantic version
string.

* Hide LFS metafile diff from commit view, marking as binary

* Show LFS notice if file in commit view is tracked

* Add notbefore/nbf JWT claim

* Correct lint suggestions - comments for structs and functions

- Add comments to LFS model
- Function comment for GetRandomBytesAsBase64
- LFS server function comments and lint variable suggestion

* Move secret generation code out of conditional

Ensures no LFS code may run with an empty secret

* Do not hand out JWT tokens if LFS server support is disabled
8 years ago
Thomas Boerger 83ed234472 Integrate templates into bindata optionally (#314)
Integrated optional bindata for the templates
8 years ago
Sandro Santilli 3fba29c571 Expand documentations 8 years ago
Sandro Santilli 6e644726d0 Lint git_diff.go
Semi-automatic linting (don't really document things)
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
Sandro Santilli f14232d2e9 This one I overlooked before 8 years ago
Sandro Santilli f6a11e0de1 More MixedCase consts 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
Rémy Boulanouar 2d68bd1ef9 Change import reference to match gitea instead of gogs (#37) 8 years ago
Unknwon b1504ed99a #3464 add diff signs which does not have inline diff 8 years ago
Unknwon 9349def72e #3464 reproduce diff signs
Commited wrong file.
8 years ago
Unknwon cd89f6c502 Web editor: improve edit file and diff preview 8 years ago
Andrey Nering 2772791fda Improve diff highlight (#3390)
- Try to reduce memory allocations
- Add possibility to disable diff highlight (can improve performance for large diffs)
- Tweaking with cost for prettier (cleaner) diffs
- Do not calculate diff when the number of removed lines in a block is not equal to the number of added lines (this usually resulted in ugly diffs)
8 years ago
Unknwon 10dc330640 #3345 dump content directly to HTTP ResponseWriter 8 years ago
Dennis Chen dfab54d5a2 Diff patch (#3345)
* Add support for .diff and .patch

Add the ability to get text-diff and format-patch by adding .diff or
.patch in the end of a commit url. Issue #2641

* models: git_diff: various fixes

* Renames commitId to commitID.
* Writes stderr to a bytes.Buffer and displays proper error message on
command failure.
* Various style changes.

Signed-off-by: Dennis Chen <barracks510@gmail.com>
8 years ago
Siarhei Navatski cf85e9eb7b add IsSubmodule field to DiffFile and hide view file button on diff page for submodules (#3097) 8 years ago
Andrey Nering 743d22669a Re-work MAX_DIFF_LINES: supress diff per file, not the whole diff (#3174) 8 years ago
Andrey Nering d160c7e565 Little refactoring of diff highlight.
Moving cache variable to template instead of in the struct.
8 years ago
Andrey Nering 2bfb8bb5fd Enable sintax highlighting on diff view. Close #733 9 years ago
Andrey Nering 5deb726f3f Refactoring of inline diff computing to prevent empty diff box. Fix #2489 9 years ago
Unknwon 8a93113192 roll back a small change 9 years ago
Unknwon 86bce4a2ae minor fix to #2335 9 years ago
Andrey Nering 697b0e2aba Fix: now highlights in diff view are getting the correct lines. 9 years ago
Andrey Nering bf11ad19ea Semantic fixes. 9 years ago
Andrey Nering 81ed5c4bee Declaring specific types for enums constants.
This makes the code more strict since you can't assign or compare
values of different types without proper cast.
9 years ago
Andrey Nering 73474c043b Highlighting differences of lines in the diff view. 9 years ago
Unknwon 4993ab1a76 #2185 fall back to use custom chardet lib 9 years ago
Unknwon 19423957b1 rename import path 9 years ago
Unknwon 50264200f0 fix huge diff hangs 9 years ago
Unknwon 95f9c85bcc #2185 use Go sub-repo to detect encoding 9 years ago
Unknwon 926e91820a #2071 Diff is not showing full content when has super long one line 9 years ago
Unknwon 902b578465 better escape char handle 9 years ago
Unknwon 3a81fdf092 rename fields 9 years ago
Unknwon 25ec20d525 #1838 update merge base before generate new patch 9 years ago
Unknwon bc82157216 fix #1078 9 years ago
Unknwon 6599869f28 #1790 fast return for too large diff 9 years ago
Unknwon 9b42f53aa8 more on #966 9 years ago
Vladimir Vissoultchev 4917d29c12 Partial impl of git diff encoding 9 years ago
Vladimir Vissoultchev fac4e27882 Allow spaces in file/dir names on parsing git diff 9 years ago
Tony Tsang fc6d80d619 Link to previous commited source file (diff.view_file button) instead of returning 404 for deleted files. 10 years ago
Peter Smit 3af757ed77 Replace mahonia with the standard functions in the Golang Sub-repositories 10 years ago
Unknwon 9a1fe801e5 fix #711 10 years ago