aboutsummaryrefslogtreecommitdiffstats
path: root/modules/git/log_name_status.go
Commit message (Collapse)AuthorAgeFilesLines
* Check for context exceeded in WalkGitLog (#17319)zeripath2021-10-151-0/+3
| | | | | | | | | | | There is a slight race in checking of a context deadline exceed in #16467 which leads to a 500 on the repository page. The solution is to check the error coming back from `*LogNameStatusRepoParser.Next()` and if it is the `ContextDeadlineExceeded` break from the loop. Fix #17314 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Defer Last Commit Info (#16467)zeripath2021-10-081-1/+12
| | | | | | | | | | | One of the biggest reasons for slow repository browsing is that we wait until last commit information has been generated for all files in the repository. This PR proposes deferring this generation to a new POST endpoint that does the look up outside of the main page request. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix missing close in WalkGitLog (#17008)zeripath2021-09-101-7/+16
| | | | | | | | | | | | | | | | | | When the external context is cancelled it is possible for the GitLogReader to not itself be Closed. This PR does three things: 1. Instead of adding a plain defer it wraps the `g.Close` in a func as `g` may change. 2. It adds the missing explicit g.Close - although the defer fix makes this unnecessary. 3. It passes down the external context as the base context for the GitLogReader meaning that the cancellation of the external context will pass down automatically. Fix #17007 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Prevent NPE on empty commit (#16812)zeripath2021-08-241-0/+3
|
* Use git log name-status in get last commit (#16059)zeripath2021-06-211-0/+398
* Improve get last commit using git log --name-status git log --name-status -c provides information about the diff between a commit and its parents. Using this and adjusting the algorithm to use the first change to a path allows for a much faster generation of commit info. There is a subtle change in the results generated but this will cause the results to more closely match those from elsewhere. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: Lauris BH <lauris@nix.lv>